From 11a94dba68c7797fc3c4bc45f249447b4243e082 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 27 Sep 2017 11:08:50 +0200 Subject: [PATCH] src/utils_match.c: Reset UTILS_MATCH_CF_GAUGE_INC matches to zero (was: NaN) Fixes: #2448 --- src/utils_match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_match.c b/src/utils_match.c index df70fbec..d3edb57c 100644 --- a/src/utils_match.c +++ b/src/utils_match.c @@ -294,7 +294,7 @@ void match_value_reset(cu_match_value_t *mv) { /* Reset GAUGE metrics only and except GAUGE_PERSIST. */ if ((mv->ds_type & UTILS_MATCH_DS_TYPE_GAUGE) && !(mv->ds_type & UTILS_MATCH_CF_GAUGE_PERSIST)) { - mv->value.gauge = NAN; + mv->value.gauge = (mv->ds_type & UTILS_MATCH_CF_GAUGE_INC) ? 0 : NAN; mv->values_num = 0; } } /* }}} void match_value_reset */ -- 2.30.2