[rrd-users] update .rrd problem

Christophe Mailhebuau christophe.mailhebuau at steria.com
Wed Sep 21 13:53:20 MEST 2005


Hi,

I've a problem to update a rrd base store snmp information from my
router.

i use this example :

http://ei.kefro.st/projects/rrdtool/

i made all by default.

i Create base with this :

#!/bin/bash
rrdtool create /root/tmp/bdprestige1/baseint.rrd  --start `date +"%s"`
--step 300 \
DS:eth0_in:COUNTER:600:0:12500000 \
DS:eth0_out:COUNTER:600:0:12500000 \
RRA:AVERAGE:0.5:1:2000 \
RRA:AVERAGE:0.5:6:2000 \
RRA:AVERAGE:0.5:24:2000 \
RRA:AVERAGE:0.5:288:2000 \
RRA:MAX:0.5:1:2000 \
RRA:MAX:0.5:6:2000 \
RRA:MAX:0.5:24:2000 \
RRA:MAX:0.5:288:2000

to update i excecute this :

#!/bin/bash -x
DS1=`snmpget -O qv -v2c -c public 10.24.0.254
interfaces.ifTable.ifEntry.ifInOctets.1|sed
's/.*if[OI]u*t*n*Octets\.[0-9]\(.*\)/\1/'`
DS2=`snmpget -O qv -v2c -c public 10.24.0.254
interfaces.ifTable.ifEntry.ifOutOctets.1|sed
's/.*if[OI]u*t*n*Octets\.[0-9]\(.*\)/\1/'`
if [[ $DS1 == '' ]]  ; then DS1=U ; fi
if [[ $DS2 == '' ]]  ; then DS2=U ; fi

/usr/bin/rrdtool update /root/tmp/bdprestige1/baseint.rrd "N:$DS1:$DS2"

(Run successfull i get good value on good oid)


<debug>
mod debug an execute :
ns0:/root/tmp/bdprestige1# ./updateinf.sh 
++ snmpget -O qv -v2c -c public 10.24.0.254
interfaces.ifTable.ifEntry.ifInOctets.1
++ sed 's/.*if[OI]u*t*n*Octets\.[0-9]\(.*\)/\1/'
+ DS1=32628683
++ snmpget -O qv -v2c -c public 10.24.0.254
interfaces.ifTable.ifEntry.ifOutOctets.1
++ sed 's/.*if[OI]u*t*n*Octets\.[0-9]\(.*\)/\1/'
+ DS2=148123171
+ [[ 32628683 == '' ]]
+ [[ 148123171 == '' ]]
+ /usr/bin/rrdtool update /root/tmp/bdprestige1/baseint.rrd
N:32628683:148123171
</debug>

but not update rrd file.

I use http://ei.kefro.st/projects/rrdtool/graph_interfaces.sh to graph.

Do you know this problem ?



-- 
Cordialement,
Christophe Mailhebuau 
Administrateur systèmes & réseaux
Steria Aquitaine
DGI - COPERNIC/AdonisV2
GPG/fingerprint: 71A0 8348 154A EB5F 8E09 4C56 6D1D 6A3B 8C49 8C50

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