Skip to content

Commit 98ef5c6

Browse files
authored
[feat] redisdb: Adds replication byte metrics (#20029)
1 parent 45ae8f5 commit 98ef5c6

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

redisdb/changelog.d/20029.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds redisdb replication byte metrics

redisdb/datadog_checks/redisdb/redisdb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ class Redis(AgentCheck):
107107
'repl_backlog_histlen': 'redis.replication.backlog_histlen',
108108
'master_repl_offset': 'redis.replication.master_repl_offset',
109109
'slave_repl_offset': 'redis.replication.slave_repl_offset',
110+
'total_net_repl_input_bytes': 'redis.replication.input_total_bytes',
111+
'total_net_repl_output_bytes': 'redis.replication.output_total_bytes',
110112
}
111113

112114
RATE_KEYS = {

redisdb/metadata.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ redis.rdb.changes_since_last,gauge,,,,The number of changes since the last backg
7373
redis.rdb.last_bgsave_time,gauge,,second,,Duration of the last bg_save operation.,0,redis,last bgsave time,
7474
redis.replication.backlog_histlen,gauge,,byte,,The amount of data in the backlog sync buffer.,0,redis,repl backlog histlen,
7575
redis.replication.delay,gauge,,offset,,The replication delay in offsets.,0,redis,replication delay,
76+
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,
7677
redis.replication.last_io_seconds_ago,gauge,,second,,Amount of time since the last interaction with master.,-1,redis,replication last io seconds ago,
7778
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,
7879
redis.replication.master_repl_offset,gauge,,offset,,The replication offset reported by the master.,0,redis,master repl offset,
80+
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,
7981
redis.replication.slave_repl_offset,gauge,,offset,,The replication offset reported by the slave.,0,redis,slave repl offset,
8082
redis.replication.sync,gauge,,,,One if a sync is in progress and zero otherwise.,0,redis,replication sync,
8183
redis.replication.sync_left_bytes,gauge,,byte,,Amount of data left before syncing is complete.,-1,redis,replication sync left bytes,

redisdb/tests/test_e2e.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ def test_e2e(dd_agent_check, master_instance):
109109
aggregator.assert_metric('redis.mem.vm_eval', count=2, tags=tags)
110110
aggregator.assert_metric('redis.mem.vm_functions', count=2, tags=tags)
111111
aggregator.assert_metric('redis.mem.vm_total', count=2, tags=tags)
112+
aggregator.assert_metric('redis.replication.input_total_bytes', count=2, tags=tags)
113+
aggregator.assert_metric('redis.replication.output_total_bytes', count=2, tags=tags)
112114

113115
assert_optional_slowlog_metrics(aggregator)
114116
aggregator.assert_all_metrics_covered()

0 commit comments

Comments
 (0)