diff --git a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml index 6fe4f88e9a..44045d49ca 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml +++ b/kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml @@ -167,3 +167,6 @@ kafka_druid_events_summary_backup_threshold: 10000 kafka_telemetry_extractor_duplicate_backup_threshold: 1000 kafka_telemetry_duplicate_backup_threshold: 1000 +### kafka exporters related vars +processing_cluster_zookeeper: "{{ groups['processing-cluster-zookeepers'] | difference(['localhost']) | map('regex_replace', '^(.*)$', '\\1:2181') | list}}" +processing_cluster_kafka: "{{ groups['processing-cluster-kafka'] | difference(['localhost']) | map('regex_replace', '^(.*)$', '\\1:9092') | list}}" diff --git a/kubernetes/ansible/roles/sunbird-monitoring/templates/processing-kafka-exporter.yaml b/kubernetes/ansible/roles/sunbird-monitoring/templates/processing-kafka-exporter.yaml index 864be511d7..69d64410b6 100644 --- a/kubernetes/ansible/roles/sunbird-monitoring/templates/processing-kafka-exporter.yaml +++ b/kubernetes/ansible/roles/sunbird-monitoring/templates/processing-kafka-exporter.yaml @@ -1,8 +1,8 @@ kafkaExporter: zookeeper: - servers: ["{{ groups['processing-cluster-zookeepers'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:2181') | list | join("\", \"") }}"] + servers: ["{{ processing_cluster_zookeeper | join('","') }}"] kafka: - servers: ["{{ groups['processing-cluster-kafka'] | difference(["localhost"]) | map('regex_replace', '^(.*)$', '\\1:9092') | list | join("\", \"") }}"] + servers: ["{{ processing_cluster_kafka | join('","') }}"] additionalFlags: - --use.consumelag.zookeeper