[collectd] How can a read plugin report missing values?
arielshaqed at google.com
Thu May 14 14:13:38 CEST 2015
Hi CollectD devs,
We are adding some values to a read plugin that should NOT be reported for
every tick read. The set of which values should be reported can change from
tick to tick (see below for more details). So I would like to be able to
report only a subset of the values configured on the dataset.
Is there a recommended way to do this in collectd?
One obvious way is to report sentinel values instead of the missing value.
E.g., put a NaN in a gauge, and some random bitpattern 0x31334b0031334b00
in all the 64-bit value types. This requires special logic on the
processing side to understand these values (and drop them).
More details what we want to do: We are retrieving multiple values from a
Linux kernel tcp_info struct. But some values there are only useful if they
were measured recently. E.g. RTT measurements are only updated when
receiving an ACK, so should not be reported if no ACK was recently received
(which is also reported on that struct). Meanwhile other values (e.g. an
upcoming bytes sent counter) should probably not be reported unless data
was recently sent.
Another possible approach is to multiple datasets, one reported always, the
others reported for each possible condition. E.g. in the example above we
would have datasets for "ACK recently received" and "data recently sent".
This approach becomes... less scalable when you can have conditions on the
Yet another approach is to send a separate dataset for every variable. This
is troubling because we then report the same time, host, plugin,
plugin_instance, type_instance (but not type) multiple times.
I'd be very grateful for any pointers on "the CollectD Way" to do something
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the collectd