Hello,
We realized that the last and average values on the graphs plotted by Nagios are always the same value, regardless of the service we are checking, or the time period. So it makes sense to assumo it's miscalculating. How can we fix this?
Performance Graph: Last and Average are always the same
Performance Graph: Last and Average are always the same
You do not have the required permissions to view the files attached to this post.
Re: Performance Graph: Last and Average are always the same
I'm experiencing the same on mine, let me take a look at the code to see what the issue is, I'll let you know what I find.
Re: Performance Graph: Last and Average are always the same
I've submitted a bug report for this:
What version of XI are you running? I have a workaround that will fix it for you but I need to know what version you are using.
Code: Select all
NEW TASK ID 6200 created - Nagios XI Bug Report: Perfgraph "Last" field is showing same as "Avg"Re: Performance Graph: Last and Average are always the same
We are running the latest Nagios XI 2014R2.7
Re: Performance Graph: Last and Average are always the same
Edit this file:
Change line 58 from this:
To this:
Then change line 201 from this:
To this :
That should fix it.
Code: Select all
/usr/local/nagiosxi/html/includes/components/graphexplorer/templates/perfdata.inc.phpCode: Select all
$perfdata_extra[$i]['last'] = $data[$j-1];Code: Select all
$perfdata_extra[$i]['last'] = $data[$j-5];Code: Select all
name: \"{$args['names'][$i]} (Last: ".round($perfdata_extra[$i]['avg'], 2).$units[$i].", Avg: ".round($perfdata_extra[$i]['avg'], 2).$units[$i].", Max: ".round($perfdata_extra[$i]['max'], 2).$units[$i].")\",Code: Select all
name: \"{$args['names'][$i]} (Last: ".round($perfdata_extra[$i]['last'], 2).$units[$i].", Avg: ".round($perfdata_extra[$i]['avg'], 2).$units[$i].", Max: ".round($perfdata_extra[$i]['max'], 2).$units[$i].")\",