Page 1 of 1

nagios/nagflux is missing few performance data (services)

Posted: Tue Jul 16, 2019 4:57 am
by pratik11886
nagflux is missing few performance data (services)

I followed this post to install nagios, nagflux and influxdb - https://support.nagios.com/kb/article/n ... u-802.html

but when I execute the below curl few of the services for hosts are missing, even PING is missing for one of the host.
curl -G "http://localhost:8086/query?db=nagflux&pretty=true" --data-urlencode "q=show series"

I spend one day in troubleshooting but couldn't find any thing.

The problem is here in /var/log/nagios/service-perfdata

Foe the below records SERVICEPERFDATA is blank, do you know why ????/
DATATYPE::SERVICEPERFDATA TIMET::1563284934 HOSTNAME::xxxxxx SERVICEDESC::xxxxxx SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_nrpe!curl_xxxxxx
DATATYPE::SERVICEPERFDATA TIMET::1563284936 HOSTNAME::xxxxxx SERVICEDESC::xxxxxx SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_nrpe!check_xxxxxx
DATATYPE::SERVICEPERFDATA TIMET::1563284940 HOSTNAME::xxxxxx SERVICEDESC::check_chronyd_service SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_nrpe!check_chronyd_service
DATATYPE::SERVICEPERFDATA TIMET::1563284959 HOSTNAME::xxxxxx SERVICEDESC::PING SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_ping!100.0,20%!500.0,60%
1563284722.perfdata.service:DATATYPE::SERVICEPERFDATA TIMET::1563284719 HOSTNAME::xxxxxx SERVICEDESC::PING SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_ping!100.0,20%!500.0,60%

Re: nagios/nagflux is missing few performance data (services

Posted: Wed Jul 17, 2019 4:22 pm
by tgriep
Can you login to the Nagios Core interface and select one of those services.
Do you see data in the Performance Data: field for the missing services?

What version of Nagios core did you install on the server?

In a standard install, this file service-perfdata in in the following folder

Code: Select all

/usr/local/nagios/var
Was there any customizations done to the Core Settings?
Can you post the nagios.cfg file and the commands.cfg file?

Re: nagios/nagflux is missing few performance data (services

Posted: Fri Jul 19, 2019 9:22 am
by pratik11886
I was able to solve this issue.

Problem here was service performance data were missing for custom nagios checks/plugins as seen below:

/var/log/nagios/service-perfdata
DATATYPE::SERVICEPERFDATA TIMET::1563284940 HOSTNAME::localhost SERVICEDESC::check_xxxx_service SERVICEPERFDATA:: SERVICECHECKCOMMAND::check_nrpe!check_xxxxx_service


Solution to this is plugins can return optional performance data in their output by sending the normal, human-readable text string that they usually would, followed by a pipe character (|), and then a string containing one or more performance data metrics.

Re: nagios/nagflux is missing few performance data (services

Posted: Fri Jul 19, 2019 10:25 am
by mbellerue
Thanks for posting the solution!