From 812d996f8a7f09148838d11f4b2b9ba618145816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 4 Mar 2021 17:52:32 +0100 Subject: [PATCH] Use zk_has_leader everywhere --- hbase-exporter | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbase-exporter b/hbase-exporter index dbc9fd0..b473c6a 100755 --- a/hbase-exporter +++ b/hbase-exporter @@ -170,16 +170,16 @@ class zk(): num_active_servers += 1 if match.group(1) == "leader": - has_leader = 1 + zk_has_leader = 1 zk_leader_address = address - prom_zookeeper_has_leader.set(has_leader) + prom_zookeeper_has_leader.set(zk_has_leader) for line in error: logging.info(line) prom_zookeeper_num_live.set(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: leader: %s", zk_leader_address) else: