diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index 44e78ecda..fe3ed82a7 100644 --- a/salt/telegraf/etc/telegraf.conf +++ b/salt/telegraf/etc/telegraf.conf @@ -837,6 +837,13 @@ files = ["/host/nsm/zeek/logs/zeek_restart.log"] data_format = "influx" {% endif %} +{% if grains.role in ['so-manager', 'so-managersearch', 'so-standalone', 'so-eval'] %} +[[inputs.file]] + files = ["/opt/so/conf/telegraf/node_tab.json"] + name_override = "node_config" + data_format = "json" + interval = 5m +{% endif %} # # Count files in a directory diff --git a/salt/telegraf/init.sls b/salt/telegraf/init.sls index f057f2dfd..90731c602 100644 --- a/salt/telegraf/init.sls +++ b/salt/telegraf/init.sls @@ -42,6 +42,7 @@ tgrafconf: - template: jinja - source: salt://telegraf/etc/telegraf.conf +{% if grains.role in ['so-manager', 'so-managersearch', 'so-standalone', 'so-eval'] %} #this file will be read by telegraf to send node details(management interface, monitor interface, etc) # into influx so that grafan can build dashboards using queries node_tab: @@ -49,6 +50,7 @@ node_tab: - name: /opt/so/conf/telegraf/node_tab.json - source: salt://telegraf/node_tab.json.jinja - template: jinja +{% endif %} so-telegraf: docker_container.running: