[collectd] Do not receive OKAY notification on missing values.
octo at verplant.org
Sat Jun 20 12:59:42 CEST 2009
On Thu, Jun 04, 2009 at 10:13:36PM +0200, Andrés J. Díaz wrote:
> Reading the code, I found that the OKAY notification behaviour is
> defined in utils_cache.c, but do not work for me :(
> I attach a workarround which check if c_avl_get fails before
> ut_check_interesting call, but I'm not sure if it's the best solution.
I don't think that's a work around but rather a full-grown bugfix ;) The
variable `ce' is used in the loop checking for timed out values. After
then, when the timed out values are handled (this needs to be done in
two steps because mixing the `iterator' with `remove' is not supported)
no `get' is called and the state of the last entry (a random entry,
probably) is updated over and over again.
I've applied your fix in a slightly modified way to the collectd-4.6
branch and merged it to the collectd-4.7 branch. Could you give it a try
and let me know if it works for you? I'd then pack new releases.
> This patch works because I think that the problem is the
> ut_check_interesting function, which return "uninteresting" for any
> missing value, because the threshold_get function fails due to the
> c_avl_get return non zero.
No, I don't think the `ut_check_interesting' function is a problem: It
looks for matching thresholds and returns a values based on that. For
this, is doesn't need any actual values, just their names. So it doesn't
``know'' if a value is missing or not and doesn't care ;)
Many thanks for all your threshold related patches :)
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090620/14c81cc2/attachment.pgp
More information about the collectd