diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index e3a286fe4..b358c178f 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -241,22 +241,17 @@ # ## Use TLS but skip chain & host verification # # insecure_skip_verify = false -{%- if GLOBALS.pipeline == "KAFKA" %} -{%- if grains.role in ['so-searchnode','so-standalone', 'so-managersearch', 'so-heavynode'] -%} +{%- 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"] username = "{{ salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user') }}" password = "{{ salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass') }}" -{%- endif %} -{%- else %} -{%- if grains.role in ['so-searchnode','so-standalone','so-manager', 'so-managersearch', 'so-heavynode', 'so-receiver'] -%} -[[inputs.logstash]] - url = "http://localhost:9600" - collect = ["pipelines"] - username = "{{ salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:user') }}" - password = "{{ salt['pillar.get']('elasticsearch:auth:users:so_logstash_user:pass') }}" -{%- endif %} {%- endif %} {% if grains.role in ['so-manager','so-managersearch','so-standalone','so-receiver'] and GLOBALS.pipeline == "KAFKA" -%}