[rrd-users] The old "illegal attempt to update" problem
C. Bensend
rrdtool at stinkweasel.net
Tue Aug 17 06:11:35 MEST 2004
Hey folks,
I have been going through Google and I see this question asked quite a
bit about cricket, larrd, etc, but I didn't find a solution to my problem.
>From the dozens of posts and questions, it seemed like most of them were
using the wrong update times, duplicate timestamps, etc.
I have a perl script that connects to a PostgreSQL database, sucks out
a date and a total, computes the epoch time of the date, and attempts to
update an RRD database with the following code:
RRDs::update( $rrd_datafile, "$epoch:$total" );
my $rrd_error = RRDs::error;
if( $rrd_error ) {
printf(LOG $syslog_fmt, $timestamp, "rebuild_daily_rrd",
"ERROR: Problem updating RRD file:", $rrd_error );
}
And as you can see it coming, I'm seeing the following in my log file:
Aug 16 22:38:41 rebuild_daily_rrd: ERROR: Problem updating RRD file:
illegal attempt to update using time 1064725199 when last update time is
1092712700 (minimum one second step)
Aug 16 22:38:42 rebuild_daily_rrd: ERROR: Problem updating RRD file:
illegal attempt to update using time 1064811599 when last update time is
1092712700 (minimum one second step)
Aug 16 22:38:43 rebuild_daily_rrd: ERROR: Problem updating RRD file:
illegal attempt to update using time 1064897999 when last update time is
1092712700 (minimum one second step)
What I don't understand is that the epoch time is correct and is not
duplicated, but the "last update time" keeps stating the time when I
started my script. If you look at the log timestamps, the time IS
increasing and I even have a 'sleep 1;' in the loop this code is called
from. Shouldn't the last update time be the last update, and be
incremented with the next loop?
Or am I an idiot and I'm missing something fundamental? I did search
for this answer before emailing the list, so hopefully I didn't miss the
answer to this...
Thanks much!
Benny
ps: rrdtool version 1.0.46 on OpenBSD 3.5-STABLE
[benny at host ~]$ rrdtool info ~/rrd/daily.rrd
rrd_version = "0001"
step = 86400
last_update = 1092712700
ds[emails].type = "GAUGE"
ds[emails].minimal_heartbeat = 86400
ds[emails].min = 0.0000000000e+00
ds[emails].max = NaN
ds[emails].last_ds = "UNKN"
ds[emails].value = 0.0000000000e+00
ds[emails].unknown_sec = 11900
rra[0].cf = "MAX"
rra[0].rows = 3650
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 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
More information about the rrd-users
mailing list