Skip to content
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

is it possible to rename slave redis with alias name? #6310

Open
ardenxu opened this issue Aug 9, 2019 · 0 comments
Open

is it possible to rename slave redis with alias name? #6310

ardenxu opened this issue Aug 9, 2019 · 0 comments

Comments

@ardenxu
Copy link

ardenxu commented Aug 9, 2019

we have master redis and 17 slaves running on k8s pods, and some of slave may share same redis host IP, this is used in production environment.

and when use redis exporter to collect metrics to prometheus side, exporter will report error as connected_slaves has duplicated data.

Googling showed that redis metric with "alias" label, but i'm not sure if its possible to add alias for dup redis slaves, thanks for help.

# Replication
role:master
connected_slaves:17
slave0:ip=1.2.3.4,port=6380,state=online,offset=248362542645,lag=0
slave1:ip=1.2.3.4,port=6380,state=online,offset=248362542645,lag=0

.....

# TYPE redis_connected_slave_offset gauge
redis_connected_slave_offset{addr="localhost:7000",alias="",slave_ip="127.0.0.1",slave_state="online"} 113638
redis_connected_slave_offset{addr="localhost:7001",alias="",slave_ip="127.0.0.1",slave_state="online"} 186453
redis_connected_slave_offset{addr="localhost:7002",alias="",slave_ip="127.0.0.1",slave_state="online"} 186396
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant