From 85fd55f0c419cfd23aef9a408e8a0167aca9e4d5 Mon Sep 17 00:00:00 2001 From: Pavel Rochnyack Date: Sun, 1 Jul 2018 13:52:31 +0700 Subject: [PATCH] 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. --- src/redis.c | 2 -- 1 file changed, 2 deletions(-) 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", -- 2.11.0