Reputation: 2214
I'm trying to set up a RRD, but I cannot seem to get the database to store any values.
Here's how I've created my database:
rrdtool create test.rrd -s 60 \
DS:local_alloc_procs:GAUGE:10:0:U \
RRA:AVERAGE:0.5:1:10080
And I have a script, which cron runs to update the database every minute:
* * * * * /home/A01113531/Documents/scripts/Cluster/rrdtool/updatescript
updatescript:
#!/bin/bash
export LD_LIBRARY_PATH=/home/A01113531/rrdtool/lib:/rc/tools/free/redhat_6_x86_64/moab-7.0.1/lib:/rc/tools/free/redhat_6_x86_64/torque-4.1.2/lib:/rc/tools/free/redhat_6_x86_64/pbs-drmaa-1.0.12/lib:$LD_LIBRARY_PATH
export PATH=/home/A01113531/rrdtool/bin:/rc/tools/free/redhat_6_x86_64/moab-7.0.1/bin:/rc/tools/free/redhat_6_x86_64/torque-4.1.2/bin:/rc/tools/free/redhat_6_x86_64/pbs-drmaa-1.0.12/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH
export MOABHOMEDIR=/rc/moab/server
RRDTOOL='/home/A01113531/rrdtool/bin/rrdtool'
FILE='/home/A01113531/Documents/scripts/Cluster/rrdtool/test.rrd'
COMMAND=$(/home/A01113531/Documents/scripts/Cluster/rrdtool/parser.py -t cluster | grep LocalAllocProcs | awk '{print $2}')
$RRDTOOL update $FILE N:$COMMAND
Here is the output of ouput of rrdtool info:
filename = "test.rrd"
rrd_version = "0003"
step = 60
last_update = 1349364541
header_size = 584
ds[local_alloc_procs].index = 0
ds[local_alloc_procs].type = "GAUGE"
ds[local_alloc_procs].minimal_heartbeat = 10
ds[local_alloc_procs].min = 0.0000000000e+00
ds[local_alloc_procs].max = NaN
ds[local_alloc_procs].last_ds = "1217"
ds[local_alloc_procs].value = NaN
ds[local_alloc_procs].unknown_sec = 1
rra[0].cf = "AVERAGE"
rra[0].rows = 10080
rra[0].cur_row = 3827
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
As you can see from this, last_ds is getting a valid number, but for some reason value is not being changed from NaN.
I've been stuck on this for a while now, any help or tips are much appreciated.
Denver
Upvotes: 2
Views: 1252
Reputation: 80
I just had this exact problem, and nearly tore all my hair out trying to work it out.
Seems that rrd is very funny about accepting data at a time that it is not expecting data. In my case I had the step set to 3600 (every hour) but the heart beat set to 10 sec. Basically if rrd wasn't getting an update within the first 10 seconds of the hour it would ignore my update.
In your case it looks like you have a step every 60 sec but a heart beat of 10 second. Try changing your heartbeat to 60 sec and see if they helps.
Upvotes: 1