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/
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd