Page 1 of 2

Perfdata Graph only integer

Posted: Wed Dec 18, 2019 4:22 pm
by suportenebrasil
In nagiosxi, the services graph shows broken values even though the service is an integer. I know PerfData uses Round Robin. But how do I define the chart to show only the value of the service? Without AVERAGE? I tried to change in 'Manage Graph Templates' to 'LAST' but to no avail ...

Re: Perfdata Graph only integer

Posted: Wed Dec 18, 2019 5:11 pm
by tgriep
Can you provide a screen shot of the graph so we can see what it looks like?
Also, provide a screen capture of the Advanced Tab for the same service under the service details menu.

Thanks

Re: Perfdata Graph only integer

Posted: Thu Dec 19, 2019 2:41 pm
by suportenebrasil
01.jpg
I only want integer values.
02.jpg
I created a plugin to generate random and integer values only.
03.jpg
Thanks for answering!

Re: Perfdata Graph only integer

Posted: Thu Dec 19, 2019 4:29 pm
by tgriep
The second screen capture was the Overview Tab, not the Advanced Tab which is the Tab with the Black Box with the white Plus Sign.

I know what the issue is that the rrdtool that plots the data is a lossy formula and the rounding of the data, creates the decimal point data to be plotted.
This article talks about the same issue except it is using the check_snmp plugin. You can follow and create the same fix except adjust the names to your plugin / command and that should work for you.

https://support.nagios.com/forum/viewto ... 65#p146465

Re: Perfdata Graph only integer

Posted: Fri Dec 20, 2019 2:50 pm
by suportenebrasil
01.png
(I tried to put in the folder "/usr/local/nagios/etc/pnp/check_commands/check_testgraph.cfg":= 'DATATYPE = GAUGE', and delete 'rrd/xml'.)
I could not do the graph is with 'integer'. I tried to put perfdata with "c", but also does not work 'integer'.(Performance Data: test=4c;0;0;)
Thanks.

Re: Perfdata Graph only integer

Posted: Fri Dec 20, 2019 3:32 pm
by tgriep
Lets enabling debugging for the performance processing daemons.

Edit this file

Code: Select all

/usr/local/nagios/etc/pnp/npcd.cfg
Change

Code: Select all

log_level = 0
To:

Code: Select all

log_level = 2
Save it

Edit this file

Code: Select all

/usr/local/nagios/etc/pnp/npcd.cfg
Change

Code: Select all

LOG_LEVEL = 0
to

Code: Select all

LOG_LEVEL = 2
Save out the file and restart these services by running

Code: Select all

service npcd restart
service nagios restart

Let the system run for 20 to 30 minutes and post the following files here so we can see what the check is returning.

Code: Select all

/usr/local/nagios/var/perfdata.log
/usr/local/nagios/var/npcd.log
Also, post the .xml and .rrd file so I can check them as well.

Re: Perfdata Graph only integer

Posted: Sat Dec 21, 2019 9:45 am
by suportenebrasil
I put in a test VM for easy viewing of the logs (nagiosxi 5.6.9). I created a service called 'check_testgraph_gauge.sh' on localhost.(Performance Data: test=4;0;0).
I added the template to '/usr/local/nagios/etc/pnp/check_commands/check_testgraph_gauge.cfg' (Uncommented 'DATATYPE = GAUGE' line only. /And permissions apache/nagios).
I deleted the files rrd/xml and restarted nagios/npcd.
Follows the attached logs,
Thanks.
perfdata.log
npcd.log

Re: Perfdata Graph only integer

Posted: Mon Dec 23, 2019 2:38 pm
by cdienger
The logs show this:

Code: Select all

No Custom Template found for check_testgraph_gauge
Please also send us a copy of the check_testgraph_gauge.cfg as well as /usr/local/nagios/share/pnp/templates.dist/check_testgraph_gauge.php.

Re: Perfdata Graph only integer

Posted: Mon Dec 23, 2019 3:35 pm
by suportenebrasil
"2019-12-21 11:11:39 [4677] [2] No Custom Template found for check_testgraph_gauge (/usr/local/nagios/etc/pnp/check_commands/check_testgraph_gauge.cfg)";

I sent the whole log, with debug enabled from the beginning.
This message seems to disappear at the end of the log, no?

"2019-12-21 11:12:40 [5030] [3] DEBUG: adjust_template() => /usr/local/nagios/etc/pnp/check_commands/check_testgraph_gauge.cfg";
check_testgraph_gauge.php.txt

Re: Perfdata Graph only integer

Posted: Mon Dec 23, 2019 5:05 pm
by cdienger
Thanks for the data. I will need to look into this further on my end and confirm with @tgriep. I've been under the impression that what you are looking for isn't possible, but there may work around that I am not aware of.