[mrtg] rateup not calculating Max/average/current graph values correctly when using gauge option

Berlinguette, Paul pberlinguette at websense.com
Wed Nov 2 22:49:08 CET 2011


Hi,

Unless I misconfigured or misunderstand the gauge option, the graph should display the given value as-is, immediately.

I did the following test with mrtg 2.16.4 & 2.17.2 on CentOS 5.6 (32bit) with same result. 

Defined a graph "abc" in mrtg.cfg with:

WithPeak[_]: ymw
Options[^]: growright,nobanner,nopercent


Target[abc]: `./get_data`
Options[abc]: noo,gauge


And the usual title, legend X & Y size, etc...

The script get_data simply echoes:
100
0
1
aHost

--------------------------------------------------------
I setup a cron to run mrtg --debug="log" ./mrtg.cfg  every 5 minutes.
1st run:  
   First line in abc.log is "<timestamp> 100 0"
   All other data values are zeroes
   Call to rateup shows includes: "-Z g 100 0" 
   HTML page shows zero for max,average,cur

Why is the HTML graph not showing Max=100, avg=100, cur=100?

2nd run:
   First line in abc.log is "<timestamp> 100 0"
   Line 2 in abc.log: "<timestamp> 100 0 100 0"
   All other data values are zeroes
   Call to rateup shows includes: "-Z g 100 0" 
   HTML page shows zero for max=92,average=93,cur=93
Why is the HTML graph not showing Max=100, avg=100, cur=100?

3rd run:
   First line in abc.log is "<timestamp> 100 0"
   Line 2 & 3 in abc.log: "<timestamp> 100 0 100 0"
   Line 4 in abc.log: "<timestamp> 92 0 100 0"
   All other data values are zeroes
   Call to rateup shows includes: "-Z g 100 0"
   HTML page shows zero for max=100,average=96,cur=100    (finally 100!)

Why is the HTML graph not showing Max=100, avg=100, cur=100?

Thanks,
Paul




 Protected by Websense Hosted Email Security -- www.websense.com 



More information about the mrtg mailing list