[rrd-users] Updates once a day

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sat Jan 31 02:38:48 CET 2015


> I'm not new to rrdtool but I think I'm missing something basic here.
> Within my network I'd like to keep track of the number of free ports on a 
> number of switches and, for my purpose, one value per day is enough.
> So I created the rrd file as follows:
>
> rrdtool create freeports.rrd --step 86400 DS:eth:GAUGE:172800:0:U 
> RRA:AVERAGE:0.5:1:30 RRA:AVERAGE:0.5:7:4 RRA:AVERAGE:0.5:30:6
>
> to have up to a six-month history.
> With this setup, when I issue an "rrdtool fetch" command, shouldn't I see 
> one row per day? I have the update script running since a week now, but I 
> still see one sigle row of output.
> On the other hand, with rrdgraph I actually see more than one value 
> displayed, but I don't understand why the CLI command returns a single 
> row.

You could examine the output of rrdtool dump to see what's going on. 
Probably the data is there, but it's best to verify.

If the data is indeed there: It could be that the 'best' RRA selected by 
RRDtool is not what you want. By providing exact numbers, there's less 
chance for RRDtool go guess wrong. Or, you could add ":step=86400" to your 
DS and try to force it (but RRDtool will still select another RRA if it 
needs to do so).

Some mistakes include using 'now' as a timestamp (either specified or as a 
default), querying more data than available in a certain RRA at either start 
or end.

Are you aware that RRDtool works in UTC?
You should have something like
--end 1422662400 --start end-2419200
in your fetch command; numbers being n*86400
In your case I would get the current timestamp, round down to the nearest 
multiple of 86400, and leave a little margin at the start so query 28 times 
86400 seconds worth of data.



More information about the rrd-users mailing list