[rrd-users] Populating the database
Osinuga Mobolaji
bosinuga at ipnxnigeria.net
Fri Jun 17 18:42:18 MEST 2005
Hello,
I have a small script that I just wrote to do the simple nms for a router's
interface.
I feel the database is being populated but it doesn't show anything from the
graph.
Though I followed the tutorials in setting this up, but I feel I am missing
something out.
What I want achieved is getting usage across an interface on a router shown
graphical while a horizontal line is drawn at a particular point on the
y-axis. This will help offset to be noticed immediately.
The script is as below: I know somebody can help with a better script (I
won't mind for the deployment I have to do over this weekend!)
#!/bin/bash
snmpget 10.50.1.1 monitor 2.2.1.10.1 > in
snmpget 10.50.1.1 monitor 2.2.1.16.1 > out
sed 's/interfaces.ifTable.ifEntry.ifInOctets.1 = Counter32: //g' in > inn
sed 's/interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: //g' out > outt
#$b<>inn
#$$c<>outt
cat inn <> b
cat outt <>c
echo $b
echo $c
rrdtool update myrouter.rrd N:$b:$c
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"
Thank you.
--
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://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list