[rrd-users] Re: Data Gatherer for RRDTool

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Nov 5 16:00:50 MET 2002

On Tue, Nov 05, 2002 at 05:19:47AM -0900, Cliff wrote:

> The example in the RRDTool tutorial is non-specific.
> Could someone please correct my perl data gatherer?

Don't copy the examples.  Use the examples only to understand
what exactly is happening, write your own application using
the knowledge you gained.

> Here is my perl script which does not work.

"which does not work".  What doesn't work?  Could it be that
you don't have the program "snmpwalk" for instance?

Wait a minute:

Does "snmpwalk -Ov -v 1 public" work at all ?

> #!/usr/bin/perl
> $ip_address = "";
> $in = `snmpwalk -Ov -v 1 $ip_address public`;
> $in =~ s/Counter32\: //g;
> #print "$in";
> $out = `snmpwalk -Ov -v 1 $ip_address public`;
> $out =~ s/Counter32\: //g;
> #print "$out";
> $do_command = "/usr/rrdtool/bin/rrdtool update /web/homenet/rrd/wmere_enet.rrd N:$in:$out" ;

The OID is

Shorthand can be used from the application *I* use. is an OID *and* an instance.  Most snmpwalk
applications don't work this way.

Specify the instance thus use "snmpget".

You do use an absolute path for "rrdtool" yet you don't do so for
"snmpwalk" (or: snmpget).  Why not?


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