can we change how Averages are calculated?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rdumont
Posts: 14
Joined: Fri Sep 02, 2016 1:33 pm

can we change how Averages are calculated?

Post by rdumont »

Can we change how Averages are calculated? Our services are disabled from 9pm to 7am weekdays and different hours on the weekend. The Averages seem to ignore that fact, can we alter how the Averages are calculated? I've attached a screen shot showing the Averages.
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: can we change how Averages are calculated?

Post by mcapra »

If you are referring to the Avg: value displayed for each set on the bottom, there isn't a very good way to modify how this is calculated without altering some source files.

The files in question are located at:

Code: Select all

/usr/local/nagiosxi/html/includes/components/graphexplorer/templates
Former Nagios employee
https://www.mcapra.com/
rdumont
Posts: 14
Joined: Fri Sep 02, 2016 1:33 pm

Re: can we change how Averages are calculated?

Post by rdumont »

yeah i'd rather not start changing the files. Would it be fair to say that the averages will only correctly in a 24X7 environment?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: can we change how Averages are calculated?

Post by rkennedy »

Is your check period set to 24x7 or only for the certain time range you mentioned?
Former Nagios Employee
rdumont
Posts: 14
Joined: Fri Sep 02, 2016 1:33 pm

Re: can we change how Averages are calculated?

Post by rdumont »

The time period is set according to our custom schedule.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: can we change how Averages are calculated?

Post by mcapra »

I would be interested in seeing the data stored for this service's RRD file. I'm not totally convinced that the average is being incorrectly calculated, but seeing the data being referenced will answer that question definitively.

In the following path:

Code: Select all

/usr/local/nagios/share/perfdata/<hostname>/
You should see a .rrd file with the name of the service check. Do the following command on that file (with the output 40254_test.xml) and share the resulting file's contents:

Code: Select all

rrdtool dump __<service_name>.rrd 40254_test.xml
If i'm understanding your configuration correctly, the .rrd file in question will probably be located at somewhere similar to (but not exactly): /usr/local/nagios/share/perfdata/ALTA2.0/__ALTA2_Staging_-_Examine_Mortgage_Synthetic_tx.rrd
Former Nagios employee
https://www.mcapra.com/
rdumont
Posts: 14
Joined: Fri Sep 02, 2016 1:33 pm

Re: can we change how Averages are calculated?

Post by rdumont »

thanks for the reply, please find the rrd file attached.
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: can we change how Averages are calculated?

Post by mcapra »

I did some sims with the data, and the answer to this question:
rdumont wrote:Would it be fair to say that the averages will only correctly in a 24X7 environment?
Is yes I believe. The logic on the back-end properly adds up all the known values provided by the RRD, but in terms of assessing "how many data points do I have", it also counts the "null" or "NaN" values as a data point. You will have many of these null entries when you have active checks disabled I imagine. I have filed a bug report for this issue (Internal ID 9611).
Former Nagios employee
https://www.mcapra.com/
Locked