Removes leader from members and changes name since it's an address.
This commit is contained in:
parent
11b73bb1a5
commit
e4ca18089f
|
@ -67,11 +67,6 @@ func (c *MembersCommand) Run(args []string) int {
|
||||||
}
|
}
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
leader, err := client.Stats()
|
|
||||||
if err == nil {
|
|
||||||
c.Ui.Output(fmt.Sprintf("Leader: %s", leader["consul"]["leader_name"]))
|
|
||||||
}
|
|
||||||
|
|
||||||
var members []agent.Member
|
var members []agent.Member
|
||||||
if wan {
|
if wan {
|
||||||
members, err = client.WANMembers()
|
members, err = client.WANMembers()
|
||||||
|
|
|
@ -733,7 +733,7 @@ func (s *Server) Stats() map[string]map[string]string {
|
||||||
"consul": map[string]string{
|
"consul": map[string]string{
|
||||||
"server": "true",
|
"server": "true",
|
||||||
"leader": fmt.Sprintf("%v", s.IsLeader()),
|
"leader": fmt.Sprintf("%v", s.IsLeader()),
|
||||||
"leader_name": s.raft.Leader(),
|
"leader_addr": s.raft.Leader(),
|
||||||
"bootstrap": fmt.Sprintf("%v", s.config.Bootstrap),
|
"bootstrap": fmt.Sprintf("%v", s.config.Bootstrap),
|
||||||
"known_datacenters": toString(uint64(len(s.remoteConsuls))),
|
"known_datacenters": toString(uint64(len(s.remoteConsuls))),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue