From ae4237c1739aecb65a5dd675bfe6cec98e749436 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 28 Dec 2023 11:45:50 -0500 Subject: [PATCH] Use all coordinators --- roles/pvc/templates/zookeeper/prometheus.env.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/pvc/templates/zookeeper/prometheus.env.j2 b/roles/pvc/templates/zookeeper/prometheus.env.j2 index a3ebe22..465c143 100644 --- a/roles/pvc/templates/zookeeper/prometheus.env.j2 +++ b/roles/pvc/templates/zookeeper/prometheus.env.j2 @@ -1,5 +1,4 @@ # Zookeeper Prometheus exporter arguments # {{ ansible_managed }} -# Set the zk-hosts to our cluster local IP address as this is where Zookeeper listens -ARGS="-zk-hosts='{% for node in pvc_nodes if node.hostname == this_node %}{{ node.cluster_ip }}{% endfor %}:2181'" +ARGS="-zk-hosts='{% for node in pvc_nodes if node.is_coordinator %}{{ node.cluster_ip }}:2181{% if not loop.last %},{% endif %}{% endfor %}'"