Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Show attached slaves in INFO output #219

Closed
antirez opened this Issue · 6 comments

3 participants

@antirez
Owner

This is a feature request for a new field in the INFO output in the replication section to show the ip:port pair of the attached slaves. Without this feature there is no easy way to check, given a master, what are the slave instance attached.

As part of this feature, also augment the information in CLIENT LIST when the client is a slave adding more slave-specific flags.

@antirez antirez was assigned
@jzawodn

This would be great to use in our monitoring system too. Thanks!

@antirez
Owner

Hi Jeremy, I was thinking to use the following format: IP:PORT:REPL_STATE separating all the slaves with a comma, so the actual output should look like the following:

slaves:192.168.40.2:6382:wait_bgsave,192.168.40.3:6379:online,192.168.40.5:6379:online

(the other possible state is "send_bulk")

Makes sense or another format would be preferable for your use case?

It is however possible to use the CLIENT LIST command to obtain detailed info about every single slave.

Thanks,
Salvatore

@jzawodn

That seems fine to me. Really, as long as it's easy to parse, I'll all for it. It'll be great to be able to sanity check replication from both ends with this.

@antirez
Owner

Great, marking as 2.4 backport candidate to have it ASAP in a production release. Thanks.

@antirez
Owner

Done, closing.

@antirez antirez closed this
@chx

I am wondering why the issue said

there is no easy way to check, given a master, what are the slave instance attached

when CLIENT LIST since 2.4 https://github.com/antirez/redis/blob/2.4.0/src/networking.c#L903 produced that information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.