[collectd] Tail plugin and DSType gauge
octo at collectd.org
Sat Sep 3 04:43:48 CEST 2011
On Fri, Sep 02, 2011 at 04:20:17PM +0300, Toni Ylenius wrote:
> I found out that a value is reset to Nan in the function
> simple_submit_match (src/utils_tail_match.c) on each submit. I don't
> understand why is this, to me it makes more sense to retain the old
> value until the file is updated.
I think there are two interesting cases:
0) Several matches are found in the last x lines.
1) No matches are found in those lines.
How (0) is handled should be clear, I hope: In your case the minimum is
computed and submitted.
For (1) it is a bit tricky to define a good behavior: If you'd gather
the average request size, for example, no requests means no average
size, hence NaN (and not zero). In your case keeping the old value
"valid" until another value has been matched might be preferable.
I've whipped together a patch which implements this behavior. You can
take a look at . It's missing documentation and the new functionality
should be ported to the "curl" and "memcachec" plugins -- preferably the
configuration part would be de-duplicated in the process.
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the collectd