From aab95971a0f927e4ed233b91dbc6bac9dbdcfafe Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:45:38 +0530 Subject: [PATCH] Issue #0000 fix: updated the kafka group name (#1745) * Issue #0000 fix: updated the kafka group name * Issue #0000 fix: added the vars in defaults * Issue #0000 fix: added the vars in defaults * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: corrected the syntax error * Issue #0000 fix: updated the exporter vars --- kubernetes/ansible/roles/sunbird-monitoring/defaults/main.yml | 3 +++ .../templates/processing-kafka-exporter.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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