[rrd-users] newbie question: C(++) integration with rrd

Steve Shipway s.shipway at auckland.ac.nz
Mon Oct 1 04:43:36 CEST 2012


> Interesting! I used to do this, but in a "convoluted" sort of way -
> running a shell script (via crontab) which checks various logs for
> "hits" (i.e. when a packet is bounced by netfilter for example) and
> then
> logs them to RRD. Although the "hits" produced are obviously not
> happening regularly, the script checking these is. Out of interest,
> what
> would happen if I do run and log data at irregular intervals to RRD?

If you log data at irregular intervals, then you'll get three effects.
1. Data normalisation - your samples will be modified to fit into the RRD's interval.  This is common; however for small values, this can cause problems, particularly if you are interested in the actual values and not the rate.
2. XFF making RRA cdps unknown.  If you have insufficient samples in an interval, then an RRA may set the value for that cdp to unknown.
3. Heartbeat making data points unknown.  This is your biggest risk.  You MUST have a sample AT LEAST as often as the heartbeat.  If the heartbeat is smaller than your interval, then an interval will be set to unknown unless multiple values are received during it.  If your heartbeat is exceptionally large, then one sample may case several data points to be created!  This can be strange.

You could, for example, log the total number of bounced packets on a regular basis.  This would work.  Or, every (regular) interval, log the number of packets bounced since the last update.  What you should not do is to only log something if and when you bounce a packet.

Steve


Steve Shipway
ITS Unix Services Design Lead
University of Auckland, New Zealand
Floor 1, 58 Symonds Street, Auckland
Phone: +64 (0)9 3737599 ext 86487
DDI: +64 (0)9 924 6487
Mobile: +64 (0)21 753 189
Email: s.shipway at auckland.ac.nz
 Please consider the environment before printing this e-mail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5900 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20121001/ba5c63de/attachment.bin 


More information about the rrd-users mailing list