Page 1 of 2

More services not keeping Historical Data

Posted: Fri Nov 02, 2018 10:50 am
by dlukinski
Hi

We've found more services (tracking Windows service up/down) not keeping historical data
- should their related perfdata files be deleted & re-created by the system?
- files are sizeable, there is data in them, but it cannot be read?

In other cases, history files were never created in first place / "No performance graphs were found for this service"


Thank you

Re: More services not keeping Historical Data

Posted: Fri Nov 02, 2018 2:00 pm
by cdienger
The perf data databases can be picky and if the check changes to pull new data or even change the unit of measurement then the old rrd files may not display data. Manually removing them from the file system(/usr/local/nagios/share/perfdata/<hostname>/<servicedesc>.[rrd|xml]) and allowing them to regenerate automatically will resolve situations like that. Another common issues is that not all plugins will return perfdata in the first place. You can verify if a perfdata is available by looking at the Host or Service detail screen:

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 1:36 pm
by dlukinski
cdienger wrote:The perf data databases can be picky and if the check changes to pull new data or even change the unit of measurement then the old rrd files may not display data. Manually removing them from the file system(/usr/local/nagios/share/perfdata/<hostname>/<servicedesc>.[rrd|xml]) and allowing them to regenerate automatically will resolve situations like that. Another common issues is that not all plugins will return perfdata in the first place. You can verify if a perfdata is available by looking at the Host or Service detail screen:
There is NO Perf Data at all (no files ever created) - strangely I've got same template for multiuple checks and there is a set of checks (All tracking various windows services) without perf data ever existed. I specifically set "Process Perf Data" to "ON", but still no graph.

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 2:20 pm
by cdienger
Does the Host or Service detail screen show perf data? If perfdata is not seen on the detail screen then perfdata is not returned an no files will be created - even if "Process Perf Data" is set to "ON".

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 3:27 pm
by dlukinski
cdienger wrote:Does the Host or Service detail screen show perf data? If perfdata is not seen on the detail screen then perfdata is not returned an no files will be created - even if "Process Perf Data" is set to "ON".
Same Host shows perf data for other checks (CPU, RAM, DISK), just not the Windows Services checks

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 3:34 pm
by npolovenko
@dlukinski, I believe Windows Service Checks don't return any perfdata. There are just not enough variables for a graph to make sense. The windows service check either returns 1 - working or 2 - not working. So the whole graph would pretty much be a straight line.

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 4:21 pm
by dlukinski
npolovenko wrote:@dlukinski, I believe Windows Service Checks don't return any perfdata. There are just not enough variables for a graph to make sense. The windows service check either returns 1 - working or 2 - not working. So the whole graph would pretty much be a straight line.
This would work. We still need Windows Service check history to be enabled, even if this is just the line with breaks.
So how to do that?

Re: More services not keeping Historical Data

Posted: Mon Nov 05, 2018 4:55 pm
by npolovenko
@dlukinski, Check_nt doesn't support that. You'd need to come up with a wrapper script that would output 1 or 0 in the performance output depending on the check result.
WMI service check supports graphing. Or if you enable the NRPE portion of the nsclient and use the following command:
./check_nrpe -H 192.xxx.xx.xx -p 5666 -c CheckServiceState -a ServiceName

Re: More services not keeping Historical Data

Posted: Tue Nov 06, 2018 2:27 pm
by dlukinski
npolovenko wrote:@dlukinski, Check_nt doesn't support that. You'd need to come up with a wrapper script that would output 1 or 0 in the performance output depending on the check result.
WMI service check supports graphing. Or if you enable the NRPE portion of the nsclient and use the following command:
./check_nrpe -H 192.xxx.xx.xx -p 5666 -c CheckServiceState -a ServiceName
Thank you, this mostly works, except for services with "$" in names (such as SQL services), what to do with these?

Re: More services not keeping Historical Data

Posted: Tue Nov 06, 2018 2:45 pm
by lmiltchev
Have you tried escaping the "$" as described in the KB article below?

https://support.nagios.com/kb/article/n ... d-168.html