Page 1 of 1

Nagios Graph Issue

Posted: Mon Jun 23, 2014 3:14 pm
by brandon.pal
I've done what I've done a whole bunch of other times when creating a Nagios graph and :evil:

1) I've created a new check called check_apache
graph_command.jpg
2) Create graph template called check_apache.php
graph_template.jpg
3) Put the default.php code into my check_apache.php ( I do this to make sure it sees the template and then I customize

and ERROR "No performance graphs were found for this service."
graph_nogo.jpg
What am I missing? What have I forgotten? Why does Nagios hate me?

As a note this check has been running for 3 days now so there sufficient information to create a graph. Oh and I'm sure there is perf data being sent.

Re: Nagios Graph Issue

Posted: Mon Jun 23, 2014 4:13 pm
by abrist
Is the check returning perfdata?
Are there any errors in:

Code: Select all

tail -50 /var/log/httpd/error_log

Re: Nagios Graph Issue

Posted: Mon Jun 23, 2014 8:15 pm
by Box293
Are the performance data files being generated? There should be two files in:

Code: Select all

/usr/local/nagios/share/perfdata/HOSTNAME/
check_apache.rrd
check_apache.xml

Re: Nagios Graph Issue

Posted: Tue Jun 24, 2014 4:19 pm
by brandon.pal
Box293 wrote:Are the performance data files being generated? There should be two files in:

Code: Select all

/usr/local/nagios/share/perfdata/HOSTNAME/
check_apache.rrd
check_apache.xml
I've just checked and it seems they are not being generated. Also no errors in /var/log/httpd/error_log.

Re: Nagios Graph Issue

Posted: Tue Jun 24, 2014 6:28 pm
by Box293
Can you send us a screenshot of the Service Status Detail when on the Advanced tab.

What we are looking for is the Performance Data: line.

Re: Nagios Graph Issue

Posted: Wed Jun 25, 2014 7:47 am
by brandon.pal
As requested.
graph_perfData.jpg

Re: Nagios Graph Issue

Posted: Wed Jun 25, 2014 1:53 pm
by tmcdonald
Does that look like the proper perfdata being returned? It's hard to tell without seeing both the plugin and the NRPE command for check_apache, so can you supply those?

As for the files not being created, what are the permissions on the /usr/local/nagios/share/perfdata/HOSTNAME/ directory?

Code: Select all

ls -l /usr/local/nagios/share/perfdata/HOSTNAME/

Re: Nagios Graph Issue

Posted: Wed Jun 25, 2014 3:07 pm
by Box293
brandon.pal wrote:As requested.
graph_perfData.jpg
This performance data is not valid as it does not conform to the standard. So it will be ignored when being processed.

From the plugin guidelines:

Code: Select all

However, it is the responsibility of the plugin writer to ensure the performance data is in a "Nagios Plugins" format. This is the expected format:

'label'=value[UOM];[warn];[crit];[min];[max]
So this check called check_apache defined in your nrpe config needs to be fixed so it conforms to the standard.

I also find that the pnp4nagios documentation explains it nicely.