I am having a heck of a time getting performance graphs in Nagios. I first tried nagios_grapher which I couldn’t get to work. Now I am trying nagiostat. However I think I have found the reason I cannot get either of them to work. Nagios isn’t doing any processing of Performance data.
I have set the nagios.cfg file to have process_performance_data=1 and service_perfdata_command=process-service-perfdata. Then I set up a command in misccommands.cfg with the following
And I still get bupkis. It looks like Nagios just isn’t processing performance data. So I recompiled nagios making sure to include --with-default-perfdata. But I still get nothing. :x
This is seriously starting to bug the heck out of me. Can anyone tell me where I am going wrong:?:?
Are you sure that the plugins you’re using return performance data? It’s not just automatic. When you run the plugin from a command line, it should return something like this:
PING OK - Packet loss = 0%, RTA = 0.02 ms|pl=0%,rta=0.02
Note the “|pl=0%,rta=0.02”. That is the performance data. If your plugins don’t return a string with a “|” in it, followed by some values, then there is no performance data to log.
Make sure your individual service checks are set to store performance data. This may require turning off state retaining, at least once, since it’s one of thos fields that doesn’t update from the config when nagios is reloaded.
I am just trying to use the stock ./check_ping command. I don’t see as where it returns the pipe or any trailing information. Is there some way that I can make it do this? I don’t see anything about it in the documentation.
On second thought, NSClient is returning extra information and as far as I can tell Nagios should be processing that as well. I am trying to pass the information to nagiosgraph, it is only set to look for ping.
However as far as I can tell when I set the process command to do a printf to a file, or even an echo to a file, it should have done it for the data NSClient is returning.
check_ping, last I looked, doesn’t return perf data. This is not a problem since your nagiostat.conf file can be configed to utilitze the OUTPUT or perf data.
Double check your configs for typos, and go through all the readme’s again. Rest assured, that the problem is not with nagios nor nagiostat, but with your config.
Permissions on your nagiostat directory are ???
ls -la whatever/nagiostat/