[rrd-users] converdDERIVE to COUNTER or GAUGE

Steve Shipway s.shipway at auckland.ac.nz
Wed Jul 9 00:52:56 CEST 2014

> I have lots of if_octets statistics written in rrd files. I would like to
> those to COUNTER or GAUGE. I am not a mathematican and I have no idea
> how to convert derivative to something different. Can you help ?

The only difference between DERIVE and COUNTER is that DERIVE allows
negative rates, and does not take counter wraparound into consideration.
So, to convert a DERIVE to and COUNTER you can just treat negative numbers
as unknowns.

RRDTool stores all numbers as rates.  The update values are converted to
rates during Normalisation, based on the DS type -- for a Gauge, it is
assumes to already be a rate; for COUNTER, DERIVE etc a time-based
calculation using the previous value(s) is done (see Alex's RRD Tutorial for
more details: http://www.vandenbogaerdt.nl/rrdtool/process.php )

This means that converting from DERIVE to GAUGE is impossible, as you no
longer know the original values submitted, only the rate of change.  As an
example, knowing how steep a hill is (the rate of change of altitude) does
not tell you how far above sealevel it is, even if you originally had that
information when first calculating the slope.

Of course, you can convert the DS type itself by exporting to XML, modifying
the DS type and recreating the RRD; this will not alter the stored data,
only the way that future updates are handled.


Steve Shipway
s.shipway at auckland.ac.nz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5909 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140708/fee1b126/attachment.bin 

More information about the rrd-users mailing list