NSCA and perfdata over icinga2

This forum was archived to /woltlab and is now in read-only mode.
  • Hi.


    recently i'm trying do send over nsca not only alerts, i want to send perfdata too.


    At first i need to say that know nsca is not the most good chance but the server that send nsca is the unique valid option..


    I know that send_nsca permit "NODE_NAME" "SERVICE_DESC" "RETURNCODE" "OUTPUT" "PERFDATA"


    In one hand nagios (and icinga) get perfdata after "|" simbol but the send_nsca put a simbol that i cant understant....


    CLIENT SERVER SEND:


    echo -e "c6926\tPower from R424E4\t0\tNODE POWER CHECK OK - Reading 123.4 Watts \t 123.4" | /usr/sbin/send_nsca -H  server -c /etc/nagios/send_nsca.cfg


    ICINGA SERVER RECEIVE:


    nsca[1588]: SERVICE CHECK -> Host Name: 'c6926', Service Description: 'Power from R424E4', Return Code: '0', Output: 'NODE POWER CHECK OK - Reading 123.4 Watts #011 123.4'



    I dont understant the meaning of #011 and i think icinga too dont understant because i dont receive any perfdata...


    Anybody can help?

  • Does it really support "perfdata" as an extra field? I would think it requires you to pass the performance data string after the pipe symbol after the output string.


    Like this (untested).


    Code
    1. echo -e "c6926\tPower from R424E4\t0\tNODE POWER CHECK OK - Reading 123.4 Watts | 123.4"
  • Does it really support "perfdata" as an extra field? I would think it requires you to pass the performance data string after the pipe symbol after the output string.


    Like this (untested).


    Code
    1. echo -e "c6926\tPower from R424E4\t0\tNODE POWER CHECK OK - Reading 123.4 Watts | 123.4"



    Hi.


    At first I thought that nsca had that option (i read in some web about that) but i think that there are no perfdata option...


    Finally i did what you say. Send the pipe and the perfdata using output part.



    Code
    1. echo -e "$1\t$2\t$3\t$4 | '$2'=$iPerfdata" | /usr/sbin/send_nsca -H  server.com -c /etc/nagios/send_nsca.cfg