summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d9cf269)
raw | patch | inline | side by side (parent: d9cf269)
author | Florian Forster <octo@collectd.org> | |
Wed, 27 Sep 2017 09:08:50 +0000 (11:08 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 27 Sep 2017 09:09:05 +0000 (11:09 +0200) |
Fixes: #2448
src/utils_match.c | patch | blob | history |
diff --git a/src/utils_match.c b/src/utils_match.c
index df70fbecc366ed62b4b7ffad953aa817bac00be5..d3edb57ccbaeac885a429fdc0eb435f54df0b165 100644 (file)
--- a/src/utils_match.c
+++ b/src/utils_match.c
/* 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 */