- if(convert_special_metrics)
- {
- /**
- * 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((strcmp(yajl->state[i-1].key, "journal_wr_bytes") == 0) &&
- (strcmp(yajl->state[i-2].key,"filestore") == 0) &&
- (strcmp(yajl->state[i].key,"avgcount") == 0))
- {
- DEBUG("ceph plugin: Skipping avgcount for filestore.JournalWrBytes");
- yajl->depth = (yajl->depth - 1);
- return CEPH_CB_CONTINUE;
- }
- }
- //probably a avgcount/sum pair. if not - we'll try full key later
- latency_type = 1;
- break;