From 5badfb9cf51d4a7fe7e0f5f9366534aad6bbdec0 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Fri, 16 Dec 2022 08:38:31 -0500 Subject: [PATCH] Fix pillar --- salt/telegraf/etc/telegraf.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/salt/telegraf/etc/telegraf.conf b/salt/telegraf/etc/telegraf.conf index 66d57e04a..a2f2b7f5b 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 TGMERGED = salt['pillar.get']('telegraf:config', TGDEFAULTS, merge=true) %} +{%- 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 }}" @@ -15,7 +15,7 @@ # Configuration for telegraf agent [agent] ## Default data collection interval for all inputs - interval = "{{ TGMERGED.interval }}" + interval = "{{ TGMERGED.config.interval }}" ## Rounds collection interval to 'interval' ## ie, if interval="10s" then always collect on :00, :10, :20, etc. round_interval = true @@ -23,27 +23,27 @@ ## Telegraf will send metrics to outputs in batches of at most ## metric_batch_size metrics. ## This controls the size of writes that Telegraf sends to output plugins. - metric_batch_size = {{ TGMERGED.metric_batch_size }} + metric_batch_size = {{ TGMERGED.config.metric_batch_size }} ## For failed writes, telegraf will cache metric_buffer_limit metrics for each ## output, and will flush this buffer on a successful write. Oldest metrics ## are dropped first when this buffer fills. ## This buffer only fills when writes fail to output plugin(s). - metric_buffer_limit = {{ TGMERGED.metric_buffer_limit }} + metric_buffer_limit = {{ TGMERGED.config.metric_buffer_limit }} ## Collection jitter is used to jitter the collection by a random amount. ## Each plugin will sleep for a random time within jitter before collecting. ## This can be used to avoid many plugins querying things like sysfs at the ## same time, which can have a measurable effect on the system. - collection_jitter = "{{ TGMERGED.collection_jitter }}" + collection_jitter = "{{ TGMERGED.config.collection_jitter }}" ## Default flushing interval for all outputs. Maximum flush_interval will be ## flush_interval + flush_jitter - flush_interval = "{{ TGMERGED.flush_interval }}" + flush_interval = "{{ TGMERGED.config.flush_interval }}" ## Jitter the flush interval by a random amount. This is primarily to avoid ## large write spikes for users running a large number of telegraf instances. ## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s - flush_jitter = "{{ TGMERGED.flush_jitter }}" + flush_jitter = "{{ TGMERGED.config.flush_jitter }}" ## By default or when set to "0s", precision will be set to the same ## timestamp order as the collection interval, with the maximum being 1s. @@ -56,7 +56,7 @@ ## Logging configuration: ## Run telegraf with debug log messages. - debug = {{ TGMERGED.debug }} + debug = {{ TGMERGED.config.debug }} ## Run telegraf in quiet mode (error log messages only). quiet = false ## Specify the log file name. The empty string means to log to stderr.