author | Andrés J. Díaz <ajdiaz@connectical.com> | |
Tue, 11 Aug 2009 19:57:34 +0000 (21:57 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sun, 16 Aug 2009 09:13:42 +0000 (11:13 +0200) | ||
commit | 08f5dee4cf337eb0cac72b87c24092e4ea2089cf | |
tree | 87c9577b8941416d2d8f446f85c4dd6e7b6b4523 | tree | snapshot |
parent | 633b8c6bbac1c6de6c675f28e428b7415e283d64 | commit | diff |
src/utils_cache.c: Update GETVAL output when missing state.
Hi
I think that I've found a bug when use unixsock plugin. The problem is
releate with missing state, when no value is received by daemon for a
while in the cache is marked as MISSING, but the last value is still
showing even when machine is not reporting in a GETVAL and LISTVAL
commands. Some utlities like collectd-nagios does not work correctly,
and report an OKAY value when host is not reporting from a long time.
I attach a patch with check the state value of an cache entry in
uc_get_names and in uc_get_rate_by_name. This patch works for me, but
it's not very tested yet, and I not very sure about if it's a good way
to check the problem. The patch is tested on 4.7.2 release version.
BTW a GETSTATE command will be an useful feature too :P
Regards,
Andres
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Hi
I think that I've found a bug when use unixsock plugin. The problem is
releate with missing state, when no value is received by daemon for a
while in the cache is marked as MISSING, but the last value is still
showing even when machine is not reporting in a GETVAL and LISTVAL
commands. Some utlities like collectd-nagios does not work correctly,
and report an OKAY value when host is not reporting from a long time.
I attach a patch with check the state value of an cache entry in
uc_get_names and in uc_get_rate_by_name. This patch works for me, but
it's not very tested yet, and I not very sure about if it's a good way
to check the problem. The patch is tested on 4.7.2 release version.
BTW a GETSTATE command will be an useful feature too :P
Regards,
Andres
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/utils_cache.c | diff | blob | history |