Use zk_has_leader everywhere
This commit is contained in:
parent
f9b1926a74
commit
812d996f8a
|
@ -170,16 +170,16 @@ class zk():
|
||||||
num_active_servers += 1
|
num_active_servers += 1
|
||||||
|
|
||||||
if match.group(1) == "leader":
|
if match.group(1) == "leader":
|
||||||
has_leader = 1
|
zk_has_leader = 1
|
||||||
zk_leader_address = address
|
zk_leader_address = address
|
||||||
prom_zookeeper_has_leader.set(has_leader)
|
prom_zookeeper_has_leader.set(zk_has_leader)
|
||||||
|
|
||||||
for line in error:
|
for line in error:
|
||||||
logging.info(line)
|
logging.info(line)
|
||||||
|
|
||||||
prom_zookeeper_num_live.set(num_active_servers)
|
prom_zookeeper_num_live.set(num_active_servers)
|
||||||
logging.info("zk: %d active ZooKeeper servers", num_active_servers)
|
logging.info("zk: %d active ZooKeeper servers", num_active_servers)
|
||||||
if has_leader:
|
if zk_has_leader:
|
||||||
logging.info("zk: Zookeeper has leader: True")
|
logging.info("zk: Zookeeper has leader: True")
|
||||||
logging.info("zk: leader: %s", zk_leader_address)
|
logging.info("zk: leader: %s", zk_leader_address)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue