fcr91
fcr91

Reputation: 23

rrd updated with NaN

I'm trying to update an rrd file with new data every 10 minutes. I've got a cronjob set to run every 10 minutes that should run the update command, but when I dump the contents of the rrd file afterwards, all values show up as NaN.

I've looked at a lot of different sites that indicate it's probably a problem with timing/step/heartbeat. I've fiddled with these and still can't get any values to show up.

Right now my step size is 600 and the heartbeat is 900 and the wrapper script runs every 10 minutes (600). This code is part of a function that will be called a couple times to create a couple of databases, hence the DSBOGO to keep it general.

$cmdCommand .= "DS:DSBOGO:GAUGE:900:U:U \\";
$cmdCommand .= "RRA:AVERAGE:0.5:1:720000 \\";
$cmdCommand .= "RRA:AVERAGE:0.5:5:144000 \\";
$cmdCommand .= "RRA:AVERAGE:0.5:60:12000 \\";
$cmdCommand .= "RRA:AVERAGE:0.5:240:3000";

Below is the rrdtool info output

filename = "TEMPNAMERcvd.rrd"
rrd_version = "0003"
step = 600
last_update = 631200000
ds[DSBOGO].type = "GAUGE"
ds[DSBOGO].minimal_heartbeat = 900
ds[DSBOGO].min = NaN
ds[DSBOGO].max = NaN
ds[DSBOGO].last_ds = "UNKN"
ds[DSBOGO].value = 0.0000000000e+00
ds[DSBOGO].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 720000
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
rra[1].cf = "AVERAGE"
rra[1].rows = 144000
rra[1].pdp_per_row = 5
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 12000
rra[2].pdp_per_row = 60
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 20
rra[3].cf = "AVERAGE"
rra[3].rows = 3000
rra[3].pdp_per_row = 240
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 80

And here is a sample of the rrdtool dump output sample

<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
        <step> 600 </step> <!-- Seconds -->
        <lastupdate> 1470334800 </lastupdate> <!-- 2016-08-04 14:20:00 EDT -->

        <ds>
                <name> DSBOGO </name>
                <type> GAUGE </type>
                <minimal_heartbeat> 900 </minimal_heartbeat>
                <min> NaN </min>
                <max> NaN </max>

                <!-- PDP Status -->
                <last_ds> 0 </last_ds>
                <value> NaN </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>

<!-- Round Robin Archives -->   <rra>
                <cf> AVERAGE </cf>
                <pdp_per_row> 1 </pdp_per_row> <!-- 600 seconds -->

                <params>
                <xff> 5.0000000000e-01 </xff>
                </params>
                <cdp_prep>
                        <ds>
                        <primary_value> NaN </primary_value>
                        <secondary_value> NaN </secondary_value>
                        <value> NaN </value>
                        <unknown_datapoints> 0 </unknown_datapoints>
                        </ds>
                </cdp_prep>

                <database>
                        <!-- 2016-05-01 00:00:00 EDT / 1462075200 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 00:10:00 EDT / 1462075800 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 00:20:00 EDT / 1462076400 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 00:30:00 EDT / 1462077000 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 00:40:00 EDT / 1462077600 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 00:50:00 EDT / 1462078200 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:00:00 EDT / 1462078800 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:10:00 EDT / 1462079400 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:20:00 EDT / 1462080000 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:30:00 EDT / 1462080600 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:40:00 EDT / 1462081200 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 01:50:00 EDT / 1462081800 --> <row><v> NaN </v></row>
                        <!-- 2016-05-01 02:00:00 EDT / 1462082400 --> <row><v> NaN </v></row>

It seems like all of my timing parameters are set up correctly, but I cannot get this to work. I've let it run for over an hour now, and no data has shown up. Not sure what else to try at this point.

I went through the whole script again printing out all of the outputs and discovered the data was not updating as often as I expected. I increased the heartbeat size and started getting data.

Upvotes: 0

Views: 3323

Answers (0)

Related Questions