[rrd-users] rrd create update problem
homephilsch at gmx.de
homephilsch at gmx.de
Mon Jul 26 10:14:26 CEST 2010
Hi,
I want to create a rrd database that should be updated DAILY (86400 secs) by using unix crontab.
My problem is that the dump shows only NaNs.
This is my "rrdtool create" command:
timestamp=`date '+%s'`
rrdtool create a.rrd --start $timestamp --step 86400 DS:logRows:GAUGE:172800:0:U RRA:AVERAGE:0.5:1:366 RRA:AVERAGE:0.5:7:53 RRA:AVERAGE:0.5:31:12
The "update command":
timestamp=`expr $timestamp + 1`
rrdtool update a.rrd $timestamp:175
Note: I set the "$timestamp+1" because otherwise the update command would claim that I cannot update the database with the same timestamp as the creation timestamp. Also note that the script creates a new database only if it did not already exist.
The result of "rrdtool dump a.rrd":
<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
<step> 86400 </step> <!-- Seconds -->
<lastupdate> 1280010602 </lastupdate> <!-- 2010-07-25 00:30:02 CEST -->
<ds>
<name> logRows </name>
<type> GAUGE </type>
<minimal_heartbeat> 172800 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> NaN </max>
<!-- PDP Status -->
<last_ds> 175 </last_ds>
<value> 1.7500000000e+02 </value>
<unknown_sec> 81001 </unknown_sec>
</ds>
<!-- Round Robin Archives --> <rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 86400 seconds -->
<params>
<xff> 5.0000000000e-01 </xff>
</params>
<cdp_prep>
<ds>
<primary_value> 0.0000000000e+00 </primary_value>
<secondary_value> 0.0000000000e+00 </secondary_value>
<value> NaN </value>
<unknown_datapoints> 0 </unknown_datapoints>
</ds>
</cdp_prep>
<database>
<!-- 2009-07-24 02:00:00 CEST / 1248393600 --> <row><v> NaN </v></row>
<!-- 2009-07-25 02:00:00 CEST / 1248480000 --> <row><v> NaN </v></row>
<!-- 2009-07-26 02:00:00 CEST / 1248566400 --> <row><v> NaN </v></row>
<!-- 2009-07-27 02:00:00 CEST / 1248652800 --> <row><v> NaN </v></row>
<!-- 2009-07-28 02:00:00 CEST / 1248739200 --> <row><v> NaN </v></row>
<!-- 2009-07-29 02:00:00 CEST / 1248825600 --> <row><v> NaN </v></row>
<!-- 2009-07-30 02:00:00 CEST / 1248912000 --> <row><v> NaN </v></row>
<!-- 2009-07-31 02:00:00 CEST / 1248998400 --> <row><v> NaN </v></row>
<!-- 2009-08-01 02:00:00 CEST / 1249084800 --> <row><v> NaN </v></row>
.
.
.
My crontab entry:
30 0 * * * updateRRD.sh
As you can see the crontab runs successfully (see lastupdate).
So my question is why I have only NaNs in the dump? Why the start time is at 02:00:00 (is the difference caused by the UTC-CEST difference )? Is it correct to have the heartbeat set to 172800 or should I set it to a smaller number?
I read many tutorials on the web about the rrdtool but I could not figure out why my rrd database isn't updated correctly.
Note also that with a database of step rate 300 (as in the rrdtool tutorial my database is updated correctly).
For completeness: I use RRDtool 1.2.30
Your help is very appreciated.
Phil
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
More information about the rrd-users
mailing list