projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
005a70a
)
empty_counter match: Add support for the DERIVE data source type.
author
Florian Forster
<octo@collectd.org>
Thu, 28 Jul 2016 10:03:43 +0000
(12:03 +0200)
committer
Florian Forster
<octo@collectd.org>
Thu, 28 Jul 2016 10:03:43 +0000
(12:03 +0200)
Fixes: #1813
src/match_empty_counter.c
patch
|
blob
|
history
diff --git
a/src/match_empty_counter.c
b/src/match_empty_counter.c
index
eba6a58
..
caa3e7e
100644
(file)
--- a/
src/match_empty_counter.c
+++ b/
src/match_empty_counter.c
@@
-89,11
+89,13
@@
static int mec_match (const data_set_t __attribute__((unused)) *ds, /* {{{ */
for (i = 0; i < ds->ds_num; i++)
{
- if (ds->ds[i].type != DS_TYPE_COUNTER)
+ if ((ds->ds[i].type != DS_TYPE_DERIVE)
+ && (ds->ds[i].type != DS_TYPE_COUNTER))
continue;
num_counters++;
- if (vl->values[i].counter == 0)
+ if (((ds->ds[i].type == DS_TYPE_DERIVE) && (vl->values[i].derive == 0))
+ || ((ds->ds[i].type == DS_TYPE_COUNTER) && (vl->values[i].counter == 0)))
num_empty++;
}