diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index f5d331209..b358c178f 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -241,7 +241,12 @@ # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false -{% if grains.role in ['so-searchnode','so-standalone','so-manager', 'so-managersearch', 'so-heavynode', 'so-receiver'] -%} +{%- set logstash_metrics_roles = ['so-searchnode','so-standalone','so-managersearch','so-heavynode'] %} +{%- if GLOBALS.pipeline != "KAFKA" %} +{%- set logstash_metrics_roles = logstash_metrics_roles + ['so-manager', 'so-receiver'] %} +{%- endif %} + +{%- if grains.role in logstash_metrics_roles %} [[inputs.logstash]] url = "http://localhost:9600" collect = ["pipelines"] @@ -252,7 +257,7 @@ {% if grains.role in ['so-manager','so-managersearch','so-standalone','so-receiver'] and GLOBALS.pipeline == "KAFKA" -%} [[inputs.jolokia2_agent]] name_prefix= "kafka_" - urls = ["http://localhost:8778/jolokia"] + urls = ["http://{{ NODEIP }}:8778/jolokia"] [[inputs.jolokia2_agent.metric]] name = "topics"