[collectd] Tail plugin and DSType gauge

Florian Forster octo at collectd.org
Sat Sep 3 04:43:48 CEST 2011


Hi Toni,

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 [0]. 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.

Regards,
—octo

[0] <https://collectd.org/gerrit/18>
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110903/1a13a020/attachment.pgp>


More information about the collectd mailing list