[rrd-users] Re: Data Gatherer for RRDTool
Serge Maandag
serge.maandag at staff.zeelandnet.nl
Tue Nov 5 15:59:35 MET 2002
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:cliff at acsalaska.net]
Sent: Tuesday, November 05, 2002 3:20 PM
To: rrd-users at list.ee.ethz.ch
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: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
--
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