[rrd-users] Re: not updating

Shipley, Rob rshipley at state.mt.us
Fri Jun 14 21:47:24 MEST 2002


In your rrd database, you can only store ONE value, as the last updates have
the same timestamp and you only have one DS. Either create multiple DSes,
rrd databases, or do some addition/sum before adding the one value to the
database. Simply put, You are attempting to update the same DS with the same
time stamp with multiple values - won't work. Like a billard table, one coin
per slot. To see the problem, write some error code, ie:  

        my $e = RRDs::error(); 
        die "ERROR: Cannot update $rrd with '$time:$minn:$paramus:$artesia'
$e\n" if ($e);

-----Original Message-----
From: Michael Gargiullo [mailto:mgargiullo at warpdrive.net]
Sent: Friday, June 14, 2002 8:06 AM
To: Rrd-Users
Subject: [rrd-users] not updating



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

--
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