Discussion:
[rrd-users] converdDERIVE to COUNTER or GAUGE
(too old to reply)
Łukasz Kostka
2014-07-08 19:31:26 UTC
Permalink
Hi

I have lots of if_octets statistics written in rrd files. I would like
to convert 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 ?
Steve Shipway
2014-07-08 22:52:56 UTC
Permalink
I have lots of if_octets statistics written in rrd files. I would like to
convert
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

Steve Shipway
***@auckland.ac.nz

Loading...