- /* Special case for latency metrics. */
- if ((i == yajl->depth-1)
- && ((strcmp(yajl->state[i].key,"avgcount") == 0)
- || (strcmp(yajl->state[i].key,"sum") == 0)))
- {
- /* Super-special case for filestore:JournalWrBytes. For some
- * reason, Ceph schema encodes this as a count/sum pair while all
- * other "Bytes" data (excluding used/capacity bytes for OSD space)
- * uses a single "Derive" type. To spare further confusion, keep
- * this KPI as 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 && (i >= 2)
- && (strcmp("filestore", yajl->state[i-2].key) == 0)
- && (strcmp("journal_wr_bytes", yajl->state[i-1].key) == 0)
- && (strcmp("avgcount", yajl->state[i].key) == 0))
- {
- DEBUG("ceph plugin: Skipping avgcount for filestore.JournalWrBytes");
- yajl->depth -= 1;
- return CEPH_CB_CONTINUE;
- }