mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 09:42:46 +01:00
create file for telegraf to read node config details
This commit is contained in:
@@ -20,11 +20,9 @@
|
||||
"iteration": 1625018989654,
|
||||
"links": [],
|
||||
"panels": [
|
||||
|
||||
{% for panel in PANELS -%}
|
||||
{%- import_json "grafana/panels/" ~ panel ~ ".json.jinja" as panel %}
|
||||
{{ panel | json }} {%- if not loop.last %},{% endif %}
|
||||
|
||||
{{ panel | json }} {% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
|
||||
],
|
||||
|
||||
@@ -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
salt/telegraf/node_tab.json.jinja
Normal file
6
salt/telegraf/node_tab.json.jinja
Normal 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 %}
|
||||
Reference in New Issue
Block a user