Merge pull request #9411 from Security-Onion-Solutions/mkr24

Change telegraf to match config map standard
This commit is contained in:
Mike Reeves
2022-12-16 13:10:15 -05:00
committed by GitHub
3 changed files with 5 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
{% import_yaml 'telegraf/defaults.yaml' as TGDEFAULTS %}
{% set TGMERGED = salt['pillar.get']('telegraf', TGDEFAULTS.telegraf, merge=True) %}

View File

@@ -1,5 +1,4 @@
# Telegraf Configuration
{% import_yaml 'telegraf/defaults.yaml' as TGDEFAULTS %}
{%- set MANAGER = GLOBALS.manager %}
{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:user', '') %}
{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %}
@@ -7,7 +6,6 @@
{%- set UNIQUEID = salt['pillar.get']('sensor:uniqueid', '') %}
{%- set ZEEK_ENABLED = salt['pillar.get']('zeek:enabled', True) %}
{%- set MDENGINE = GLOBALS.md_engine %}
{%- set TGMERGED = salt['pillar.get']('telegraf', TGDEFAULTS.telegraf, merge=true) %}
# Global tags can be specified here in key="value" format.
[global_tags]
role = "{{ GLOBALS.role.split('-') | last }}"

View File

@@ -1,7 +1,7 @@
{% from 'allowed_states.map.jinja' import allowed_states %}
{% if sls in allowed_states %}
{% from 'vars/globals.map.jinja' import GLOBALS %}
{% from 'telegraf/config.map.jinja' import TGMERGED %}
include:
- ssl
@@ -50,6 +50,7 @@ tgrafconf:
- show_changes: False
- defaults:
GLOBALS: {{ GLOBALS }}
TGMERGED: {{ TGMERGED }}
# this file will be read by telegraf to send node details (management interface, monitor interface, etc)
# into influx so that Grafana can build dashboards using queries