diff --git a/salt/telegraf/config.sls b/salt/telegraf/config.sls index f9a7bbfdb..3873d1da0 100644 --- a/salt/telegraf/config.sls +++ b/salt/telegraf/config.sls @@ -7,6 +7,7 @@ {% if sls.split('.')[0] in allowed_states %} {% from 'vars/globals.map.jinja' import GLOBALS %} {% from 'telegraf/map.jinja' import TELEGRAFMERGED %} +{% from 'logstash/map.jinja' import LOGSTASH_MERGED %} # add Telegraf to monitor all the things tgraflogdir: @@ -89,6 +90,7 @@ tgrafconf: - defaults: GLOBALS: {{ GLOBALS }} TELEGRAFMERGED: {{ TELEGRAFMERGED }} + LOGSTASH_MERGED: {{ LOGSTASH_MERGED }} # this file will be read by telegraf to send node details (management interface, monitor interface, etc) # into influx diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index e74c79f6c..05ed70d68 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -7,7 +7,7 @@ {%- set UNIQUEID = salt['pillar.get']('sensor:uniqueid', '') %} {%- set ZEEK_ENABLED = salt['pillar.get']('zeek:enabled', True) %} {%- set MDENGINE = GLOBALS.md_engine %} -{%- set LOGSTASH_ENABLED = salt['pillar.get']('logstash:enabled', False) %} +{%- set LOGSTASH_ENABLED = LOGSTASH_MERGED.enabled %} # Global tags can be specified here in key="value" format. [global_tags] role = "{{ GLOBALS.role.split('-') | last }}"