[collectd] Problem with wrapping interface and custom counters

Mariusz Gronczewski xani666 at gmail.com
Wed Apr 1 11:22:59 CEST 2009


Hi,

i've hacked a patch to add derive and absolute DS types to collectd (
my C skills are low, but that wasn't hard :) )
http://devrandom.pl/wp-content/uploads/2009/04/collectd-462-derive-absolute.patch

Basically i needed it for collecting data from haproxy (thru exec
plugin), because with normal "counter" everytime i restarted haproxy i
had big spike in rrd file and limits looked like ugly workaround for
me. I hope someone will have use for that patch ;)

Regards
Mariusz Gronczewski

2009/3/23 Mariusz Gronczewski <xani666 at gmail.com>
>
> Only idea i can thougth of is adding support for DERIVE DST of rrd files so rrdtools will store NaN on counter wraps. Still it will bug on things like interface who get randomly reset their counters like ppp or VPNs... but then if DERIVE was supported adding thing like "use_derive_instead_of_gauge" to interface/netlink module wont be probably too complicated.
>
>
> 2009/3/23 Florian Forster <octo at verplant.org>
>>
>> Hi Mariusz,
>>
>> On Mon, Mar 23, 2009 at 12:43:04PM +0100, Mariusz Gronczewski wrote:
>> > is there any way to force collectd to give NaN when wrapping a counter
>> > (basically work like DERIVE datasouce in rrdtool) or use DERIVE
>> > instead of COUNTER when i fetch data via exec plugin ?
>>
>> currently, the only way around these problems is to specify an
>> appropriate maximum value. If the value (the calculated rate for counter
>> values) exceeds this maximum value, RRDtool will automatically store a
>> NaN.
>>
>> collectd simply passes the counters on to RRDtool, therefore doing
>> wrap-around- or reset-detection is not easily possible in collectd.
>>
>> By the way, you can re-define types in a custom types.db. This is by
>> intention so you can set a maximum value without modifying the
>> distribution provided file which is probably overwritten next time you
>> update the package..
>>
>> If you have any suggestions to improve the situation, I'm agog to hear
>> it :)
>>
>> Regards,
>> -octo
>> --
>> Florian octo Forster
>> Hacker in training
>> GnuPG: 0x91523C3D
>> http://verplant.org/
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.6 (GNU/Linux)
>>
>> iD8DBQFJx6TEHdggu3Q05IYRAoZKAKCDRNnj4Y5349axlgy+4bfkfjPucwCfa9SB
>> 4v1IUMnmkzD9nOSD9OZxWKI=
>> =Ygxb
>> -----END PGP SIGNATURE-----
>>
>



More information about the collectd mailing list