Page 1 of 1
can we change how Averages are calculated?
Posted: Wed Sep 14, 2016 12:32 pm
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.
Re: can we change how Averages are calculated?
Posted: Wed Sep 14, 2016 3:43 pm
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
Re: can we change how Averages are calculated?
Posted: Thu Sep 15, 2016 4:32 pm
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?
Re: can we change how Averages are calculated?
Posted: Thu Sep 15, 2016 4:41 pm
by rkennedy
Is your check period set to 24x7 or only for the certain time range you mentioned?
Re: can we change how Averages are calculated?
Posted: Fri Sep 16, 2016 9:05 am
by rdumont
The time period is set according to our custom schedule.
Re: can we change how Averages are calculated?
Posted: Fri Sep 16, 2016 2:02 pm
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
Re: can we change how Averages are calculated?
Posted: Thu Sep 22, 2016 11:54 am
by rdumont
thanks for the reply, please find the rrd file attached.
Re: can we change how Averages are calculated?
Posted: Thu Sep 22, 2016 4:56 pm
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).