[rrd-users] RRDs with unpredictable update time

Till Dörges td at pre-secure.de
Tue Mar 24 22:42:09 CET 2009


Hello everybody,

I'm trying to collect and store data (e.g. how many times a TCP port is being
accessed in a certain interval) but with a rather unpredictable source. Ideally I get
a measurement every 300 seconds. But sometimes I don't get anything for hours or
days. I intend to store the data for 7 days in the original resolution (300s).

For performance reasons, 'rrdtool update' should only be called, when there actually
is data. This means for the example below, it's called only 5 times.


Example:
--------
 time         events
---------------------
 t_0             123
 t_0 +    5m     456
 t_0 +   10m     789
 t_0 + 2h10m    1111
 t_0 + 4h10m    2222


Same example but with an actual RRD:
------------------------------------
rrdtool create test.rrd --start=0 DS:events:GAUGE:600:0:U RRA:AVERAGE:0.5:1:2016
rrdtool update test.rrd '1237923900:123'
rrdtool update test.rrd '1237924200:456'
rrdtool update test.rrd '1237924500:789'
rrdtool update test.rrd '1237931700:1111'
rrdtool update test.rrd '1237938900:2222'


When looking at the RRAs I get:

rrdtool dump test.rrd
--- snip ---
  <!-- 2009-03-24 20:45:00 CET / 1237923900 --> <row><v> NaN </v></row>
  <!-- 2009-03-24 20:50:00 CET / 1237924200 --> <row><v> 4.5600000000e+02 </v></row>
  <!-- 2009-03-24 20:55:00 CET / 1237924500 --> <row><v> 7.8900000000e+02 </v></row>
[...]
  <!-- 2009-03-24 22:55:00 CET / 1237931700 --> <row><v> NaN </v></row>
[...]
  <!-- 2009-03-25 00:55:00 CET / 1237938900 --> <row><v> NaN </v></row>
--- snap ---

Obviously the value 1111 is "lost".


If I do an update (with a value of 0) every 300 seconds, all values are in the RRA as
I would expect it, but like I said, if possible I'd like to avoid updates if there is
no data.


The question now is, whether there's a solution for my problem or whether RRDtool
simply is not designed to do so. Searching the documentation, mailinglist archives
and the web didn't help. I'd appreciate any hints (or pointers to do an rtfm). :-)


TIA -- Till
-- 
Dipl.-Inform. Till Dörges                      td at pre-secure.de
Senior Researcher                 Phone: +49 (0)700 / PRESECURE

PRESECURE Consulting GmbH, Münster         AG Münster, HRB 6581
Geschäftsführer/Managing Director   Dr. Klaus-Peter Kossakowski

                            CarmentiS - Early Warning Expertise
                                       http://www.carmentis.org



More information about the rrd-users mailing list