[rrd-users] graph problem

Lorin Scraba lorins at assist.ro
Wed Nov 26 17:59:35 MET 2003


Hi!
	I'm trying to create some traffic graphs using the same time intervals as in 
mrtg. The day and week graphs are ok but month and year aren't. I update my 
rrd file with counters from iptables. Here's my configuration:

rrdtool create arrakis.rrd --step 300 --start N \
		DS:traffic_in:ABSOLUTE:600:U:U \
		DS:traffic_out:ABSOLUTE:300:U:U 
		RRA:AVERAGE:0.5:1:288 \
		RRA:AVERAGE:0.5:6:336 \
		RRA:AVERAGE:0.5:24:336 \
		RRA:AVERAGE:0.5:288:336

rrdtool graph /var/www/html/rrd/arrakis_day.gif --start N-1days --end N \
        --width 500 \
        --height 150 \
        --alt-y-grid \
        --vertical-label "bps" \
        --unit "bps" \
        --color CANVAS#00007F \
        --color BACK#00007F \
        --color FONT#FFFFFF \
        --color MGRID#FFFFFF \
        -t "Arrakis Fief Traffic Statistics DAY" \
        DEF:traffic_in=/etc/rrdtool/arrakis.rrd:traffic_in:AVERAGE \
        DEF:traffic_out=/etc/rrdtool/arrakis.rrd:traffic_out:AVERAGE \
        CDEF:traffic_b_in=traffic_in,8,*  \
        CDEF:traffic_b_out=traffic_out,8,* \
        AREA:traffic_b_in#FF0000:"Trafic Intrare" \
        LINE2:traffic_b_out#0000FF:"Trafic Iesire\n" \
        HRULE:250000#FF0000:"Garantat\n" \
        GPRINT:traffic_b_in:LAST:"IN | Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:AVERAGE:"Medie\: %5.0lf %sbps\n" \
        GPRINT:traffic_b_out:LAST:"OUT| Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:AVERAGE:"Medie\: %5.0lf %sbps"

rrdtool graph /var/www/html/rrd/arrakis_week.gif --start N-1weeks --end N \
        --width 500 \
        --height 150 \
        --alt-y-grid \
        --vertical-label "bps" \
        --unit "bps" \
        --color CANVAS#00007F \
        --color BACK#00007F \
        --color FONT#FFFFFF \
        --color MGRID#FFFFFF \
        -t "Arrakis Fief Traffic Statistics WEEK" \
        DEF:traffic_in=/etc/rrdtool/arrakis.rrd:traffic_in:AVERAGE \
        DEF:traffic_out=/etc/rrdtool/arrakis.rrd:traffic_out:AVERAGE \
        CDEF:traffic_b_in=traffic_in,8,*  \
        CDEF:traffic_b_out=traffic_out,8,* \
        AREA:traffic_b_in#FF0000:"Trafic Intrare"\
        LINE2:traffic_b_out#0000FF:"Trafic Iesire\n" \
        HRULE:15000#00FF00:"Garantat\n" \
        GPRINT:traffic_b_in:LAST:"IN | Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:AVERAGE:"Medie\: %5.0lf %sbps\n" \
        GPRINT:traffic_b_out:LAST:"OUT| Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:AVERAGE:"Medie\: %5.0lf %sbps"

rrdtool graph /var/www/html/rrd/arrakis_month.gif --start N-1months --end N \
        --width 500 \
        --height 150 \
        --alt-y-grid \
        --vertical-label "bps" \
        --unit "bps" \
        --color CANVAS#00007F \
        --color BACK#00007F \
        --color FONT#FFFFFF \
        --color MGRID#FFFFFF \
        -t "Arrakis Fief Traffic Statistics MONTH" \
        DEF:traffic_in=/etc/rrdtool/arrakis.rrd:traffic_in:AVERAGE \
        DEF:traffic_out=/etc/rrdtool/arrakis.rrd:traffic_out:AVERAGE \
        CDEF:traffic_b_in=traffic_in,8,*  \
        CDEF:traffic_b_out=traffic_out,8,* \
        LINE1:traffic_b_out#FF0000:"Trafic Intrare" \
        AREA:traffic_b_in#0000FF:"Trafic Iesire\n"\
        HRULE:15000#FF0000:"Garantat\n" \
        GPRINT:traffic_b_in:LAST:"IN | Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:AVERAGE:"Medie\: %5.0lf %sbps\n" \
        GPRINT:traffic_b_out:LAST:"OUT| Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:AVERAGE:"Medie\: %5.0lf %sbps"

rrdtool graph /var/www/html/rrd/arrakis_year.gif --start N-1years --end N \
        --width 500 \
        --height 150 \
        --alt-y-grid \
        --vertical-label "bps" \
        --unit "bps" \
        --color CANVAS#00007F \
        --color BACK#00007F \
        --color FONT#FFFFFF \
        --color MGRID#FFFFFF \
        -t "Arrakis Fief Traffic Statistics YEAR " \
        DEF:traffic_in=/etc/rrdtool/arrakis.rrd:traffic_in:AVERAGE \
        DEF:traffic_out=/etc/rrdtool/arrakis.rrd:traffic_out:AVERAGE \
        CDEF:traffic_b_in=traffic_in,8,*  \
        CDEF:traffic_b_out=traffic_out,8,* \
        LINE1:traffic_b_out#FF0000:"Trafic Intrare" \
        AREA:traffic_b_in#0000FF:"Trafic Iesire\n"\
        HRULE:15000#FF0000:"Garantat\n" \
        GPRINT:traffic_b_in:LAST:"IN | Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_in:AVERAGE:"Medie\: %5.0lf %sbps\n" \
        GPRINT:traffic_b_out:LAST:"OUT| Last\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:MAX:"Max\: %5.0lf %sbps" \
        GPRINT:traffic_b_out:AVERAGE:"Medie\: %5.0lf %sbps"

	I'm a bit lost in here so any suggestion is appreciated.
	You can see my graphs at: http://arrakis.assist.ro/rrd/draw.php
10x in advance,
-- 
Lorin Scraba - Customer Service
s.c. ASSIST Software s.r.l.
phone (40) 230 524020
GPG: http://users.assist.ro/~lorins/lorin.gpg
BOFH excuse #149:

Dew on the telephone lines.

--
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