From de05fb53fad6bc998f585b704ca0caeadc14a035 Mon Sep 17 00:00:00 2001 From: Aleksei Zakharov Date: Fri, 1 Dec 2017 19:07:04 +0300 Subject: [PATCH] ceph plugin: Fix #2572 Signed-off-by: Florian Forster --- src/ceph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph.c b/src/ceph.c index 3accbd3f..73140a54 100644 --- a/src/ceph.c +++ b/src/ceph.c @@ -280,7 +280,7 @@ static int ceph_cb_number(void *ctx, const char *number_val, * the same type of other "Bytes". Instead of keeping an "average" or * "rate", use the "sum" in the pair and assign that to the derive * value. */ - if (convert_special_metrics && (state->depth >= 2) && + if (convert_special_metrics && (state->depth > 2) && (strcmp("filestore", state->stack[state->depth - 2]) == 0) && (strcmp("journal_wr_bytes", state->stack[state->depth - 1]) == 0) && (strcmp("avgcount", state->key) == 0)) { -- 2.11.0