inaccurate performance data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hzsoliel
Posts: 34
Joined: Fri Sep 28, 2018 1:34 pm

inaccurate performance data

Post by hzsoliel »

Hi there,

We have a custom service that does some work and provides answers in integer format. We have verified that we only ever receive integers. Our custom dashlet also reflects these data and we have twice verified that everything is in integer format.

However, when we look at the "performance data" histogram for the service, we notice that the number displayed below (latest, max, etc) are showing up as decimals. This is misleading because the numbers represents the number of the people or the number of the meetings and we need to find out (a) why Nagios is doing that, and (b) how to prevent the decimal numbers.
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: inaccurate performance data

Post by tgriep »

There is a formula that performance data gets processed through and what you are seeing is rounding errors from that formula which is causing the graph to display the decimal points.

To fix the issue, you have to create a template and a new command that will use the template.

In Core Config Manager
Create a copy of the existing command and give it a new name

Without knowing what the plugin is that you are using, the following is an example command name. Adjust the name for your plugin.

Code: Select all

define command {
       command_name                  		check_gauge
       command_line                  		$USER1$/check_xxxxxx -H $HOSTADDRESS$ $ARG1$
}
Then edit the service check to use the check_gauge command and not the original command


The graph template is called check_gauge.cfg and it needs to be uploaded to this folder in the XI system /usr/local/nagios/etc/pnp/check_commands/

Code: Select all

/usr/local/nagios/etc/pnp/check_commands/check_gauge.cfg
Then run this to make a copy of it as a php file in the templates folder.

Code: Select all

cp /usr/local/nagios/etc/pnp/check_commands/check_gauge.cfg /usr/local/nagios/share/pnp/templates/check_gauge.php
Changed the permissions of the check_gauge.cfg file to the following

Code: Select all

chown apache.nagios check_gauge.cfg
chmod 666 check_gauge.cfg
Delete the .rrd and .xml files for that service. You will loose all of the history. They are in this folder under the hostname

Code: Select all

/usr/local/nagios/share/perfdata/<HostName>/
After 15 minutes, the graph should be populated with the data and not have the decimal points.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hzsoliel
Posts: 34
Joined: Fri Sep 28, 2018 1:34 pm

Re: inaccurate performance data

Post by hzsoliel »

Thanks. You may close this thread.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: inaccurate performance data

Post by tgriep »

Your welcome. I'll close and lock the post but feel free to open a new post for any other questions in the future.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked