create file for telegraf to read node config details

This commit is contained in:
m0duspwnens
2021-07-06 13:06:03 -04:00
parent a5067718d2
commit dc1363aaf5
3 changed files with 15 additions and 3 deletions
+8
View File
@@ -42,6 +42,14 @@ tgrafconf:
- template: jinja
- source: salt://telegraf/etc/telegraf.conf
#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:
file.managed:
- name: /opt/so/conf/telegraf/node_tab.json
- source: salt://telegraf/node_tab.json.jinja
- template: jinja
so-telegraf:
docker_container.running:
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-telegraf:{{ VERSION }}
+6
View File
@@ -0,0 +1,6 @@
{% for tabtype in ['managertab', 'managersearchtab', 'standalonetab', 'sensorstab', 'nodestab', 'evaltab'] %}
{% set node_type_data = salt['pillar.get'](tabtype, False) %}
{% if node_type_data %}
{{ node_type_data | json }}
{% endif %}
{% endfor %}