Discussion:
[rrd-users] Issue: only the first value gets into the database
(too old to reply)
spookyx
2014-08-09 11:40:34 UTC
Permalink
Hello all,

I am having an issue with rrd... i am still a newby with it, but trying to
figure out what I am doing wrong.

I have database with 9 DS:
DS:Cluj-Napoca:GAUGE:360:0:1000 \
DS:Timisoara:GAUGE:360:0:1000 \
DS:Iasi:GAUGE:360:0:1000 \
DS:Constanta:GAUGE:360:0:1000 \
DS:Craiova:GAUGE:360:0:1000 \
DS:Brasov:GAUGE:360:0:1000 \
DS:Galati:GAUGE:360:0:1000 \
DS:Ploiesti:GAUGE:360:0:1000 \
DS:Oradea:GAUGE:360:0:1000 \

And the update command is:
rrdtool update wazers_ro.rrd
N:${USERS[1]}:${USERS[2]}:${USERS[3]}:${USERS[4]}:${USERS[5]}:${USERS[6]}:${USERS[7]}:${USERS[8]}:${USERS[9]}

However only the first value gets update. If I do a dump on the file this is
what I get:
<row><v> 2.1000000000e+01 </v><v> NaN </v><v> NaN
</v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN
</v></row>

So, why aren't the other values going into the database?

Thanks.



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Issue-only-the-first-value-gets-into-the-database-tp7582340.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
Steve Shipway
2014-08-09 23:44:53 UTC
Permalink
Data Normalisation. You have not collected enough data yet.

You are submitting your data with 'N' for 'Now' as the time point; however, RRDTool stores in regular Interval steps. Assuming your interval is 5min, then you need to cover the whole 5min before the cdp (consolidated data point) in the RRA can be written, which means that you will usually need to least 2 updates before it starts to write. After that, you should get one data point every update.

If your DS type is not Gauge, then you definitely need 2 data points in order to work out the slope.

If you have an Interval of X seconds and a heartbeat of H, and your smallest RRA has a Consolidation step size of S, then continue to submit data points at approximately X seconds intervals but not more than H seconds for at least X(S+1) seconds, and you should see data points start to appear in the RRA.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487


________________________________________
From: rrd-users-bounces+s.shipway=***@lists.oetiker.ch [rrd-users-bounces+s.shipway=***@lists.oetiker.ch] on behalf of spookyx [***@infocon.ro]
Sent: Saturday, 9 August 2014 11:40 p.m.
To: rrd-***@lists.oetiker.ch
Subject: [rrd-users] Issue: only the first value gets into the database

Hello all,

I am having an issue with rrd... i am still a newby with it, but trying to
figure out what I am doing wrong.

I have database with 9 DS:
DS:Cluj-Napoca:GAUGE:360:0:1000 \
DS:Timisoara:GAUGE:360:0:1000 \
DS:Iasi:GAUGE:360:0:1000 \
DS:Constanta:GAUGE:360:0:1000 \
DS:Craiova:GAUGE:360:0:1000 \
DS:Brasov:GAUGE:360:0:1000 \
DS:Galati:GAUGE:360:0:1000 \
DS:Ploiesti:GAUGE:360:0:1000 \
DS:Oradea:GAUGE:360:0:1000 \

And the update command is:
rrdtool update wazers_ro.rrd
N:${USERS[1]}:${USERS[2]}:${USERS[3]}:${USERS[4]}:${USERS[5]}:${USERS[6]}:${USERS[7]}:${USERS[8]}:${USERS[9]}

However only the first value gets update. If I do a dump on the file this is
what I get:
<row><v> 2.1000000000e+01 </v><v> NaN </v><v> NaN
</v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN
</v></row>

So, why aren't the other values going into the database?

Thanks.



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Issue-only-the-first-value-gets-into-the-database-tp7582340.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.
Simon Hobson
2014-08-10 14:16:33 UTC
Permalink
Post by spookyx
rrdtool update wazers_ro.rrd
N:${USERS[1]}:${USERS[2]}:${USERS[3]}:${USERS[4]}:${USERS[5]}:${USERS[6]}:${USERS[7]}:${USERS[8]}:${USERS[9]}
Create a short test script that does updates with fixed values - both for time and inputs. We have absolutely no idea when you ran the command, nor what the contents of your array were. If we don't know what went in, we cannot even start to guess at what should come out.
Also, as already pointed out, you need enough updates to have values for a complete period of time before you'll get data out.

Go to http://www.vandenbogaerdt.nl/rrdtool/ and in particular see the tutorial on Rates, normalizing and consolidating - it'll help a lot.
Loading...