> i am new user for rrd tool, i have been using mrtg for last three > months now i want to play with rrd tool, can any one help me in easir > way how do i set it up for my routers and switches, > > i would be very thank ful to you
Here is a good place to start: http://www.rrdtool.com/tutorial/rrdtutorial.html That tutorial speaks specifically about duplicating the functionality of mtrg. Create mtrg-like RRD databases with this command: rrdtool create myrouter.rrd \ DS:input:COUNTER:600:U:U \ DS:output:COUNTER:600:U:U \ RRA:AVERAGE:0.5:1:600 \ RRA:AVERAGE:0.5:6:700 \ RRA:AVERAGE:0.5:24:775 \ RRA:AVERAGE:0.5:288:797 \ RRA:MAX:0.5:1:600 \ RRA:MAX:0.5:6:700 \ RRA:MAX:0.5:24:775 \ RRA:MAX:0.5:288:797 And create mrtg-like graphs with this command: rrdtool graph myrouter-day.gif --start -86400 \ DEF:inoctets=myrouter.rrd:input:AVERAGE \ DEF:outoctets=myrouter.rrd:output:AVERAGE \ AREA:inoctets#00FF00:"In traffic" \ LINE1:outoctets#0000FF:"Out traffic" You will have to change the '--start -86400' to get weekly -604800, monthly - 2419200, and yearly -29030400 graphs. You have to figure out the best way to get the data into the database. I personally use the following script on a Linux server: (note: it assumes that you already set up the databases with the same names as the servers you're getting the data from.) </usr/local/bin/rrd_update.sh> #! /bin/bash cd /home/httpd/html/rrd/ export PATH=$PATH:/usr/local/rrdtool/bin:/usr/local/bin/ if [ $# == 0 ]; then for SERVER in `cat /etc/rrd_update.lst`; do IFS=',' export SERVER ARGS=`echo $SERVER | { read NAME COMMUNITY IFACE; echo $NAME $COMMUNITY $IFACE; }` IFS=' ' rrd_update.sh $ARGS done exit fi IFS=' ' DATA="N" DATA=`snmpget -Onv $1 $2 interfaces.ifTable.ifEntry.ifInOctets.$3 interfaces.ifTable.ifEntry.ifOutOctets.$3 | \ { while read NAME BITS; do DATA="${DATA}:$BITS" done; echo $DATA }` rrdtool update $1.rrd $DATA <//usr/local/bin/rrd_update.sh> Which uses a list of routers/servers in a separate file that looks like this: </etc/rrd_update.lst> alteon,public-ro,1 logserver,public-ro,1 webserver,public-ro,1 <//etc/rrd_update.lst> The format is: server name in dns, snmp community string, interface number I schedule rrd_update.sh in cron to run every 5 minutes, and it finds my list ofservers, gets snmp data from each, and updates their databases. -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
