Skip to content

[feat] redisdb: Adds replication byte metrics #20029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions redisdb/changelog.d/20029.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds redisdb replication byte metrics
2 changes: 2 additions & 0 deletions redisdb/datadog_checks/redisdb/redisdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 2 additions & 0 deletions redisdb/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions redisdb/tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading