-
Notifications
You must be signed in to change notification settings - Fork 877
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
feat: add label master_replid
to metricinstance_info
#924
Conversation
Pull Request Test Coverage Report for Build 382Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good - thanks for the PR!
@@ -168,7 +168,10 @@ func (e *Exporter) extractInfoMetrics(ch chan<- prometheus.Metric, info string, | |||
keyValues["redis_mode"], | |||
keyValues["os"], | |||
keyValues["maxmemory_policy"], | |||
keyValues["tcp_port"], keyValues["run_id"], keyValues["process_id"], | |||
keyValues["tcp_port"], | |||
keyValues["run_id"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I missed one thing, for KeyDB, there maybe multiple master. So will be multiple |
after do some research, I think we may not add the I have three KeyDB server with docker-compose(server3 is slave of server1 and server2) services:
server1:
container_name: server1
image: eqalpha/keydb
networks:
- keydb
server2:
container_name: server2
image: eqalpha/keydb
networks:
- keydb
server3:
container_name: server3
image: eqalpha/keydb
networks:
- keydb
command: keydb-server --multi-master yes --active-replica yes --replicaof server1 6379 --replicaof server2 6379
networks:
keydb: the # Replication
role:active-replica
master_global_link_status:up
connected_masters:2
master_host:server1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:10
master_sync_in_progress:0
slave_read_repl_offset:155
slave_repl_offset:155
master_1_host:server2
master_1_port:6379
master_1_link_status:up
master_1_last_io_seconds_ago:10
master_1_sync_in_progress:0
slave_read_repl_offset:155
slave_repl_offset:155
slave_priority:100
slave_read_only:0
replica_announced:1
connected_slaves:0
master_failover_state:no-failover
master_replid:21003fb414c556027d43524e4c8ce8660a318eb2
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:268
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:268 and # Replication
role:master
connected_slaves:1
slave0:ip=10.89.0.4,port=6379,state=online,offset=295,lag=1
master_failover_state:no-failover
master_replid:02a5eb9523b6046a67b9866a12140cbc5fab7da7
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:295
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:295 and
My thoughtalthough server3 has 2 master, but it only has one totally unique |
metrics output
related issue: #919
only add label
master_replid
to metricinstance_info
, replication metrics hasn't add this label. Will add later