[rrd-users] issues on graphing 1 year graph

Neil neil-on-rrd at restricted.dyndns.org
Tue May 11 23:06:34 MEST 2004


Hey guys, 

This is how I created my rrd file. 

rrdtool create ping_on_deb.rrd -s 60
DS:minrtt:GAUGE:600:0:U
DS:maxrtt:GAUGE:600:0:U
DS:avgrtt:GAUGE:600:0:U
RRA:AVERAGE:0.5:1:483840
RRA:MIN:0.5:1440:1
RRA:MAX:0.5:1440:1
RRA:MIN:0.5:10080:1
RRA:MAX:0.5:10080:1
RRA:MIN:0.5:40320:1
RRA:MAX:0.5:40320:1
RRA:MIN:0.5:483840:1
RRA:MAX:0.5:483840:1 

I am just wondering why on my 1 year graph, values are becoming smaller. 

Here is my script that creates the drawing. 

#!/bin/sh 

HOSTNAME=$1
PUSHEDTIME=$2
SUBJECT=$3 

RRDB=/usr/local/nagios/rrd/ping_on_$1.rrd 

NOW=`date +%s`
ONE_HOUR_AGO=$(($NOW-3600))
ONE_DAY_AGO=$(($NOW-86400))
ONE_WEEK_AGO=$(($NOW-604800))
ONE_MONTH_AGO=$(($NOW-2419200))
ONE_YEAR_AGO=$(($NOW-29030400))
TIMESTAMP="Generated on `date`" 

function draw_graphic()
{
       rrdtool graph $1 -s $2 -e $3 -a PNG \
       -t "$SUBJECT, $4" -w 520 -h 160 \
       -l 0 -O 255 -r --units-exponent 0 \
       COMMENT:"Response Time min/max/avg (ms)\n" \
       COMMENT:"                                                             
MIN     MAX     AVG    LAST\n" \
       DEF:load5var=$RRDB:avgrtt:AVERAGE AREA:load5var#ffc000:"Average RTT" 
GPRINT:load5var:AVERAGE:"                                                 
%3.0lf" GPRINT:load5var:MIN:"%6.0lf" GPRINT:load5var:MAX:"%6.0lf" 
GPRINT:load5var:LAST:"%6.0lf" COMMENT:"\n" \
       DEF:load15var1=$RRDB:minrtt:AVERAGE LINE2:load15var1#0000FF:"Minimum 
RTT" GPRINT:load15var1:AVERAGE:"                                             
%3.0lf" GPRINT:load15var1:MIN:"%6.0lf" GPRINT:load15var1:MAX:"%6.0lf" 
GPRINT:load15var1:LAST:"%6.0lf" COMMENT:"\n" \
       DEF:load1var=$RRDB:maxrtt:AVERAGE LINE2:load1var#FF0000:"Maximum RTT" 
GPRINT:load1var:AVERAGE:"                                                 
%3.0lf" GPRINT:load1var:MIN:"%6.0lf" GPRINT:load1var:MAX:"%6.0lf" 
GPRINT:load1var:LAST:"%6.0lf" COMMENT:"\n" \
       COMMENT:"\n" \
       COMMENT:"$5\n"
} 

draw_graphic 
'/usr/local/nagios/share/images/'$HOSTNAME'_ping_last_hour'$PUSHEDTIME'.png' 
$ONE_HOUR_AGO $NOW "$HOSTNAME (last 1hr)" "$TIMESTAMP"
draw_graphic 
'/usr/local/nagios/share/images/'$HOSTNAME'_ping_last_day'$PUSHEDTIME'.png' 
$ONE_DAY_AGO $NOW "$HOSTNAME (last 24hrs)" "$TIMESTAMP"
draw_graphic 
'/usr/local/nagios/share/images/'$HOSTNAME'_ping_last_week'$PUSHEDTIME'.png' 
$ONE_WEEK_AGO $NOW "$HOSTNAME (last week)" "$TIMESTAMP"
draw_graphic 
'/usr/local/nagios/share/images/'$HOSTNAME'_ping_last_month'$PUSHEDTIME'.png 
' $ONE_MONTH_AGO $NOW "$HOSTNAME (last month)" "$TIMESTAMP"
draw_graphic 
'/usr/local/nagios/share/images/'$HOSTNAME'_ping_last_year'$PUSHEDTIME'.png' 
$ONE_YEAR_AGO $NOW "$HOSTNAME (last year)" "$TIMESTAMP" 

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list