[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 127.0.0.1 public 2.2.1.10.2" work at all ?
> #!/usr/bin/perl
>
> $ip_address = "127.0.0.1";
> $in = `snmpwalk -Ov -v 1 $ip_address public 2.2.1.10.2`;
> $in =~ s/Counter32\: //g;
>
> #print "$in";
>
> $out = `snmpwalk -Ov -v 1 $ip_address public 2.2.1.16.2`;
> $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 1.3.6.1.2.1.2.2.1.10
Shorthand: 2.2.1.10
Shorthand can be used from the application *I* use.
2.2.1.10.2 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?
HTH
Alex
--
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