Seems alright to me.
Are you sure you are getting values?

There might be a '\n' in your values. chomp them to be sure.

Serge.

b.t.w., use the -q switch to supress the Counter32 from the output and
consider using snmpget, not snmpwalk. You're only getting 1 value.

b.t.w.2: I'm missing a `$do_command`; at the end!

-----Original Message-----
From: Cliff [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 05, 2002 3:20 PM
To: [email protected]
Subject: [rrd-users] Data Gatherer for RRDTool



Hi folks

The example in the RRDTool tutorial is non-specific.
Could someone please correct my perl data gatherer?
Or show me an example that works?
Here is my perl script which does not work.
Thanks in advance.

#!/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" ;

#man snmpget
#$syscontact = `snmpwalk -Ov -v 1 $ip_address public
.1.3.6.1.2.1.1.4.0`;

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to