Perfdata Graph only integer

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Perfdata Graph only integer

Post 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 ...
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Perfdata Graph only integer

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post 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!
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Perfdata Graph only integer

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Perfdata Graph only integer

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Perfdata Graph only integer

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
suportenebrasil
Posts: 9
Joined: Tue Aug 06, 2019 2:25 pm
Contact:

Re: Perfdata Graph only integer

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Perfdata Graph only integer

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked