Re: [mrtg] temperature graphs averaging out wrong

This is a discussion on Re: [mrtg] temperature graphs averaging out wrong within the MRTG forums, part of the Networking and Network Related category; On Fri, Apr 04, 2008 at 11:53:15AM +1300, Max wrote: > I am happy enough with the daily ...


Go Back   Usenet Forums > Networking and Network Related > MRTG

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-04-2008
Alex van den Bogaerdt
 
Posts: n/a
Default Re: [mrtg] temperature graphs averaging out wrong

On Fri, Apr 04, 2008 at 11:53:15AM +1300, Max wrote:

> I am happy enough with the daily graphs, but I must be recording the
> data wrong somewhere, as the graphs for longer periods are not showing
> the Max or Min of the temperatures, but I suspect are averaging them out
> over a longer period (i think).
>
> This is naturally one of those problems of the dam computer doing what I
> ask it to do, rather than what I want it to do.


Indeed. You ask it to show averages.

> I'm hoping it is a simple mistake, and somebody can show me the errors
> of my way, though I suspect I will have to lose all the data I have
> collected so far :(


That depends. If you remember correctly, you do store MIN and MAX
rates. If so, you can start using them and nothing's lost.

> rrdtool graph /var/www/rrdtool/temperature-day.png \
> DEF:in1=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
> DEF:in2=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
> DEF:out=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \


> VDEF:MaxIn1=in1,MAXIMUM \


This is the maximum of all averages. You want the maximum of
all maximums.

> VDEF:MinIn1=in1,MINIMUM \


This is the minimum of all averages. You want the minimum of
all minimums.

Suggestion: a couple more DEFs:

> DEF:in1min=/var/www/rrdtool/temperature.rrd:internal:MIN \
> DEF:in2min=/var/www/rrdtool/temperature.rrd:inside:MIN \
> DEF:outmin=/var/www/rrdtool/temperature.rrd:outside:MIN \
> DEF:in1avg=/var/www/rrdtool/temperature.rrd:internal:AVERAGE \
> DEF:in2avg=/var/www/rrdtool/temperature.rrd:inside:AVERAGE \
> DEF:outavg=/var/www/rrdtool/temperature.rrd:outside:AVERAGE \
> DEF:in1max=/var/www/rrdtool/temperature.rrd:internal:MAX \
> DEF:in2max=/var/www/rrdtool/temperature.rrd:inside:MAX \
> DEF:outmax=/var/www/rrdtool/temperature.rrd:outside:MAX \


and change the VDEFs:

> VDEF:MaxIn2=in2max,MAXIMUM \
> VDEF:MinIn2=in2min,MINIMUM \
> VDEF:AvgIn2=in2avg,AVERAGE \


and so on.

Why? Average RRA's work like this:

RRA 1: 10,11,12,10,9,8,11,12,13,12,10,8 -> 10,11,12,10,9,8,11,12,13,12,10,8
RRA 2: (10,11,12), (10,9,8), (11,12,13), (12,10,8) -> 11,9,12,10
RRA 3: ((10,11,12), (10,9,8)) , ((11,12,13), (12,10,8)) -> 10,10

max(10,11,12,10,9,8,11,12,13,12,10,8) == 13
max(11,9,12,10) == 12
max(10,10)==10
min(10,11,12,10,9,8,11,12,13,12,10,8) == 8
min(11,9,12,10) == 9
min(10,10)==10


Now using the MAX rra:

RRA 1: 10,11,12,10,9,8,11,12,13,12,10,8 -> 10,11,12,10,9,8,11,12,13,12,10,8
RRA 2: (10,11,12),(10,9,8),(11,12,13),(12,10,8) -> 12,10,13,12
RRA 3: ((10,11,12),(10,9,8)),((11,12,13),(12,10,8)) -> 12,13

max(10,11,12,10,9,8,11,12,13,12,10,8) == 13
max(12,10,13,12) == 13
max(12,13)==13


Similar for the MIN rra.


HTH
--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:16 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0