From: Pavel Rochnyack Date: Sun, 1 Jul 2018 06:52:31 +0000 (+0700) Subject: redis plugin: Remove `operations_per_second` metric. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=85fd55f0c419cfd23aef9a408e8a0167aca9e4d5;p=collectd.git redis plugin: Remove `operations_per_second` metric. The `operations_per_second` metric removed as duplicate of other metric and as it has wrong value also. Collectd should not report wrong values. Metric `operations_per_second` is based on `instantaneous_ops_per_sec` field from Redis `INFO` output. That field is calculated based on buffer of 16 values, updated from `stat_numcommands` once per 100ms. So, `instantaneous_ops_per_sec` value has average only for last 1.6 seconds. While Collectd poll period is 10 seconds, statistics for 8.4 seconds is lost. Herewith, Collectd already has correct metric `total_operations`, based on `total_commands_processed` field taken from same `stat_numcommands` internally in Redis. Value of this metric should be used instead of removed metric. --- diff --git a/src/redis.c b/src/redis.c index 7edd329c..41442b66 100644 --- a/src/redis.c +++ b/src/redis.c @@ -654,8 +654,6 @@ static void redis_read_server_info(redis_node_t *rn) { "total_connections_received", DS_TYPE_DERIVE); redis_handle_info(rn->name, rr->str, "total_operations", NULL, "total_commands_processed", DS_TYPE_DERIVE); - redis_handle_info(rn->name, rr->str, "operations_per_second", NULL, - "instantaneous_ops_per_sec", DS_TYPE_GAUGE); redis_handle_info(rn->name, rr->str, "expired_keys", NULL, "expired_keys", DS_TYPE_DERIVE); redis_handle_info(rn->name, rr->str, "evicted_keys", NULL, "evicted_keys",