[rrd-users] Re: Error while updating database

Alex van den Bogaerdt alex at ergens.op.het.net
Wed Sep 10 21:55:00 MEST 2003

On Wed, Sep 10, 2003 at 08:34:14PM +0100, Dayo Adeyeye wrote:

> if1input=$(snmpget -c $community $ipaddr . | awk '{print $3}')
> if1output=$(snmpget -c $community $ipaddr . | awk '{print $3}')
> /usr/local/rrdtool/bin/rrdtool update /usr/local/rrdtool/bin/"$box".rrd N:${if1input}:${if1output}

> Now when I run the following command: ./fillrrd.sh alvarion community_string
> I get the following error:  expected 2 data source readings (got 4) from N:Counter32::Counter32::....

So, ${if1input} is expanded to "Counter32:" and so is ${if1output}.

> How can I correct this please ?

By changing your script so that it outputs numbers in stead of
"Counter32:".  What do you think?

Change the line "/usr/local/rrdtool/bin/" and so on into the following:

echo "debug: >>${if1input}<<  >>${if1output}<<"

As long as your script does not return the following
(the numbers will be different of course)

   debug: >>12345<<  >>23456<<

then don't even think about rrdtool yet.  For help on shell programming,
seek a mailing list/usenet group on shell programming.


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