[rrd-users] Question regarding missing data points

Buescher, Friedhelm Friedhelm.Buescher at cewe.de
Thu Oct 27 11:00:52 CEST 2016

> Let me elaborate on this:
> > rrdtool update test.rrd 1477433700:15
> > # rrdtool update test.rrd 1477434000:NaN   # here is a missed measuring
> > point
> > rrdtool update test.rrd 1477434300:8
> > Can anyone advise how to setup the rrd, so that one missing PDP gets
> > exactly one NaN ?
> The problem is that you get 2, not 1, unknown PDPs. That is because the
> update at timestamp 1477434300 will fill all the time between the last update
> (1477433700) and itself. The rate is unknown because of your heartbeat
> settings.
> As far as I know you cannot do something in RRDtool to say that updates are
> for 300 seconds only and if there is more time not updated, it should be
> processed as if it was updated with U. But who knows, maybe I'm missing
> something.
> Unless someone else comes up with a better solution, you will have to
> update using U (for unknown) or accept that one more PDP will also be
> unknown.  If the monitoring is offline for e.g. 55 minutes, the next update
> will try to fill 12 PDPs which will all be unknown.
> A quick hack, if you can spare the resources, is to update 300 seconds ago
> with rate U and just ignore the error RRDtool will give you if that update was
> already successfully done.
> A less quick hack is to modify your scripts so that it remembers the last
> update time (or queries it from the RRD) and looks at the difference with
> now. If that is more than 300 seconds, then update with rate U and time
> now-300s.
Yes, i implemented the last approach and it worked as expected:

Everytime I get a new value to update, I ask the rrd to for the last timestamp (rrd->last). If this timestamp is older than $now -monitoring_intervall, I update the timestamp $now - $monitoring_intervall with U. After that, I update $now with the current value. This gives exactly one missing block in RRD as expected.

Thanks for your support in thinking!

Best regards,

CEWE Stiftung & Co. KGaA mit Sitz in Oldenburg; Registergericht Oldenburg HR B 208214; Persönlich haftende geschäftsführende und vertretungsberechtigte Gesellschafterin:
Neumüller CEWE COLOR Stiftung, Sitz: Oldenburg;
Stiftungsverzeichnis der rechtsfähigen Stiftungen des bürgerlichen Rechts im Bezirk der Regierungsvertretung Oldenburg Nummer 15(034).
Dr. Rolf Hollander (Vorsitzender), Patrick Berkhouwer, Dr. Reiner Fageth, Dr. Christian Friege, Carsten Heitkamp, Dr. Olaf Holzkämper, Thomas Mehls, Frank Zweigle
Otto Korte (Vorsitzender)
UST ID-Nr. DE815453806; St.-Nr. 64/200/38999; GLN 40 04468 00000 4

More information about the rrd-users mailing list