diff --git a/redisdb/changelog.d/20029.added b/redisdb/changelog.d/20029.added new file mode 100644 index 0000000000000..863abf6099aa5 --- /dev/null +++ b/redisdb/changelog.d/20029.added @@ -0,0 +1 @@ +Adds redisdb replication byte metrics diff --git a/redisdb/datadog_checks/redisdb/redisdb.py b/redisdb/datadog_checks/redisdb/redisdb.py index 005d87f61663a..cbfaaf5d19531 100644 --- a/redisdb/datadog_checks/redisdb/redisdb.py +++ b/redisdb/datadog_checks/redisdb/redisdb.py @@ -107,6 +107,8 @@ class Redis(AgentCheck): 'repl_backlog_histlen': 'redis.replication.backlog_histlen', 'master_repl_offset': 'redis.replication.master_repl_offset', 'slave_repl_offset': 'redis.replication.slave_repl_offset', + 'total_net_repl_input_bytes': 'redis.replication.input_total_bytes', + 'total_net_repl_output_bytes': 'redis.replication.output_total_bytes', } RATE_KEYS = { diff --git a/redisdb/metadata.csv b/redisdb/metadata.csv index 32dd4419956b1..5a72278d71c7e 100644 --- a/redisdb/metadata.csv +++ b/redisdb/metadata.csv @@ -73,9 +73,11 @@ redis.rdb.changes_since_last,gauge,,,,The number of changes since the last backg redis.rdb.last_bgsave_time,gauge,,second,,Duration of the last bg_save operation.,0,redis,last bgsave time, redis.replication.backlog_histlen,gauge,,byte,,The amount of data in the backlog sync buffer.,0,redis,repl backlog histlen, redis.replication.delay,gauge,,offset,,The replication delay in offsets.,0,redis,replication delay, +redis.replication.input_total_bytes,gauge,,byte,,The total number of bytes read from the network for replication purposes,-1,redis,total replication input bytes, redis.replication.last_io_seconds_ago,gauge,,second,,Amount of time since the last interaction with master.,-1,redis,replication last io seconds ago, redis.replication.master_link_down_since_seconds,gauge,,second,,Amount of time that the master link has been down.,0,redis,master link down since, redis.replication.master_repl_offset,gauge,,offset,,The replication offset reported by the master.,0,redis,master repl offset, +redis.replication.output_total_bytes,gauge,,byte,,The total number of bytes written to the network for replication purposes,-1,redis,total replication output bytes, redis.replication.slave_repl_offset,gauge,,offset,,The replication offset reported by the slave.,0,redis,slave repl offset, redis.replication.sync,gauge,,,,One if a sync is in progress and zero otherwise.,0,redis,replication sync, redis.replication.sync_left_bytes,gauge,,byte,,Amount of data left before syncing is complete.,-1,redis,replication sync left bytes, diff --git a/redisdb/tests/test_e2e.py b/redisdb/tests/test_e2e.py index a689c9c8c7eb4..e0fb6c26f046e 100644 --- a/redisdb/tests/test_e2e.py +++ b/redisdb/tests/test_e2e.py @@ -109,6 +109,8 @@ def test_e2e(dd_agent_check, master_instance): aggregator.assert_metric('redis.mem.vm_eval', count=2, tags=tags) aggregator.assert_metric('redis.mem.vm_functions', count=2, tags=tags) aggregator.assert_metric('redis.mem.vm_total', count=2, tags=tags) + aggregator.assert_metric('redis.replication.input_total_bytes', count=2, tags=tags) + aggregator.assert_metric('redis.replication.output_total_bytes', count=2, tags=tags) assert_optional_slowlog_metrics(aggregator) aggregator.assert_all_metrics_covered()