[rrd-users] not updating
Michael Gargiullo
mgargiullo at warpdrive.net
Fri Jun 14 16:05:49 MEST 2002
Hey all,
I've been killing myself with this. I'm trying to create a script that
queries 4 machines, gets a number from each then inserts them into an RRD.
I know the snmp statements work and that I get real numbers from it. I've
used this portion of the script before. but my RRDs::update statement
isn't working. Below I've included the create statement I used and the
script that I'd one day like to run from cron. When I run a fetch all I get
is a list of times and NaN. Can someone shed some light on the subject.
Thank you.
CREATE:
/usr/local/rrdtool-1.0.38/bin/rrdtool create cmts1.rrd
DS:Modems-Up:GAUGE:600:U:U:U RRA:AVERAGE:0.5:1:288 RRA:AVERAGE:0.5:288:7
SCRIPT:
#!/usr/bin/perl -w
use strict;
use RRDs;
my $stjoe=`snmpwalk x.x.x.x public .1.3.6.1.2.1.10.12.3.3.1.9 | wc -l`;
my $paramus=`snmpwalk x.x.x.x public .1.3.6.1.2.1.10.12.3.3.1.9 | wc -l`;
my $artesia=`snmpwalk x.x.x.x public .1.3.6.1.2.1.10.12.3.3.1.9 | wc -l`;
my $cambridge=`snmpwalk x.x.x.x public .1.3.6.1.2.1.10.12.3.3.1.9 | wc -l`;
chomp($stjoe);
$stjoe=~ s/^\s+//;
chomp($paramus);
$paramus=~ s/^\s+//;
chomp($artesia);
$artesia=~ s/^\s+//;
chomp($cambridge);
$cambridge=~ s/^\s+//;
my $time=time();
my $minn=($stjoe+$cambridge);
RRDs::update("/home/mike/cmts1.rrd", "$time:$minn", "$time:$paramus",
"$time:$artesia");
#EOF
RESULT:
1024049100: nan
1024049400: nan
1024049700: nan
1024050000: nan
1024050300: nan
1024050600: nan
1024050900: nan
1024051200: nan
1024051500: nan
1024051800: nan
1024052100: nan
1024052400: nan
1024052700: nan
1024053000: nan
1024053300: nan
1024053600: nan
1024053900: nan
1024054200: nan
1024054500: nan
1024054800: nan
1024055100: nan
1024055400: nan
1024055700: nan
1024056000: nan
1024056300: nan
1024056600: nan
1024056900: nan
Thanks Again,
-Mike
Michael Gargiullo
Network Administrator
Warp Drive Networks
590 Valley Health Plaza
Paramus NJ 07650
1-201-576-9292 x260
1-201-225-0007 - F
www.warpdrive.net
--
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