X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fceph.c;h=5ea90499ae2090a35d646a2d4284768e4a80fc43;hb=da11ce02eb202b3e01d3e2d1b40f248a84430973;hp=73140a54a7deb05194bafc8a1e2312dfab80f551;hpb=85d892df2794d992c8e3554d8990d1306f114c11;p=collectd.git diff --git a/src/ceph.c b/src/ceph.c index 73140a54..5ea90499 100644 --- a/src/ceph.c +++ b/src/ceph.c @@ -281,7 +281,9 @@ static int ceph_cb_number(void *ctx, const char *number_val, * "rate", use the "sum" in the pair and assign that to the derive * value. */ if (convert_special_metrics && (state->depth > 2) && + state->stack[state->depth - 2] && (strcmp("filestore", state->stack[state->depth - 2]) == 0) && + state->stack[state->depth - 1] && (strcmp("journal_wr_bytes", state->stack[state->depth - 1]) == 0) && (strcmp("avgcount", state->key) == 0)) { DEBUG("ceph plugin: Skipping avgcount for filestore.JournalWrBytes");