Re: [rrd-users] Drawing daily Min/Max graph from a source with UN values

2015-02-01 Thread Simon Hobson
Alexander Topolanek at...@ocv.org wrote:

 I'm fetching data from my radio weather station and put them into graphs. A 
 graph that shows the temperature over the day, and follow up graphs that show 
 min, max and average temps from the previous days.
 
 Unfortunately some times the transmission from the weather station fails, and 
 I have unknown values for a few minutes. A short gap in the daily temps gauge 
 is not a problem, but for any day with a UN Value I do not get 
 min/max/average calculations...
 
 
 That is the command for calculation the weekly values:
 
 rrdtool graph temps-week-2103.png   -s 'now - 1 week' -e 'now'  \
 --title Temperatur in LE  \
 DEF:temps9=/var/rrd/weather.rrd:temps9:AVERAGE  \
 VDEF:temps9min=temps9,MINIMUM \
 VDEF:temps9max=temps9,MAXIMUM \
 VDEF:temps9last=temps9,LAST \
 COMMENT:\t\t\tMin   \
 COMMENT:Max   \
 COMMENT:Aktuell \
 COMMENT:\n \
 LINE4:temps9#00C000:KS-300  \
 GPRINT:temps9min:%6.1lf  \
 GPRINT:temps9max:%6.1lf %S \
 GPRINT:temps9last:%6.1lf %S \n

You would probably be better having an RRA for min and max in your database 
rather than just one for average. Two reasons - firstly you can specify the XFF 
value (eg allow 50% to be unknown before the RRA becomes unknown), and also 
because min and max will become more and more inaccurate the further the data 
is consolidated.
On the latter, you could have a day that swings between say -10˚ at night and 
+10˚ during the day - but after consolidation it could end up with 
min=max=average=0 !

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users


[rrd-users] Drawing daily Min/Max graph from a source with UN values

2015-02-01 Thread Alexander Topolanek

Hello all,

I'm fetching data from my radio weather station and put them into 
graphs. A graph that shows the temperature over the day, and follow up 
graphs that show min, max and average temps from the previous days.


Unfortunately some times the transmission from the weather station 
fails, and I have unknown values for a few minutes. A short gap in the 
daily temps gauge is not a problem, but for any day with a UN Value I do 
not get min/max/average calculations...



That is the command for calculation the weekly values:

rrdtool graph temps-week-2103.png   -s 'now - 1 week' -e 'now'  \
--title Temperatur in LE  \
DEF:temps9=/var/rrd/weather.rrd:temps9:AVERAGE  \
VDEF:temps9min=temps9,MINIMUM \
VDEF:temps9max=temps9,MAXIMUM \
VDEF:temps9last=temps9,LAST \
COMMENT:\t\t\tMin   \
COMMENT:Max   \
COMMENT:Aktuell \
COMMENT:\n \
LINE4:temps9#00C000:KS-300  \
GPRINT:temps9min:%6.1lf  \
GPRINT:temps9max:%6.1lf %S \
GPRINT:temps9last:%6.1lf %S \n

I've tried to play around with CDEF

rrdtool graph temps-week-2103.png   -s 'now - 1 week' -e 'now'  \
--title Temperatur in LE  \
DEF:temps9=/var/rrd/weather.rrd:temps9:AVERAGE  \
VDEF:temps9last=temps9,LAST  \
CDEF:temps9c=temps9,UN,temps9last,temps9,IF \
VDEF:temps9min=temps9c,MINIMUM \
VDEF:temps9max=temps9c,MAXIMUM \
VDEF:temps9last=temps9,LAST \
COMMENT:\t\t\tMin   \
COMMENT:Max   \
COMMENT:Aktuell \
COMMENT:\n \
LINE4:temps9#00C000:KS-300  \
GPRINT:temps9min:%6.1lf  \
GPRINT:temps9max:%6.1lf %S \
GPRINT:temps9last:%6.1lf %S \n \

but that gives an ERROR: Attempting to reuse 'temps9last'

any help?

thanks and kind regards,
Alexander

___
rrd-announce mailing list
rrd-annou...@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-announce

___
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users