Skip to content

Commit b5da03f

Browse files
authored
Merge pull request #767 from manala/telegraf/update-base-telegraf-config-template
[Telegraf] Update base telegraf config template
2 parents 7913b6b + e16f6b5 commit b5da03f

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- [Nginx] Update nginx config templates
1919
- [Oh My Zsh] Update manala users template
2020
- [Php] Update sury fpm pools templates
21+
- [Telegraf] Update base telegraf config template
2122

2223
### Removed
2324
- [Redis] Remove no more supported 5.0 config template

extensions/molecule/telegraf/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
ansible.builtin.import_role:
1414
name: manala.roles.telegraf
1515
vars:
16+
manala_telegraf_config_template: config/telegraf/base/telegraf.conf.j2
1617
manala_telegraf_configs:
1718
- file: outputs.conf
1819
config:

roles/telegraf/templates/config/telegraf/base/telegraf.conf.j2

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,16 @@
8282
## Log only error level messages.
8383
{{ config.agent | manala.roles.toml_parameter('quiet', default=false, comment=true) }}
8484

85-
## Log target controls the destination for logs and can be one of "file",
86-
## "stderr" or, on Windows, "eventlog". When set to "file", the output file
87-
## is determined by the "logfile" setting.
88-
{{ config.agent | manala.roles.toml_parameter('logtarget', default='file', comment=true) }}
85+
## Log format controls the way messages are logged and can be one of "text",
86+
## "structured" or, on Windows, "eventlog".
87+
{{ config.agent | manala.roles.toml_parameter('logformat', default='text', comment=true) }}
8988

90-
## Name of the file to be logged to when using the "file" logtarget. If set to
91-
## the empty string then logs are written to stderr.
89+
## Message key for structured logs, to override the default of "msg".
90+
## Ignored if `logformat` is not "structured".
91+
{{ config.agent | manala.roles.toml_parameter('structured_log_message_key', default='message', comment=true) }}
92+
93+
## Name of the file to be logged to or stderr if unset or empty. This
94+
## setting is ignored for the "eventlog" format.
9295
{{ config.agent | manala.roles.toml_parameter('logfile', default='', comment=true) }}
9396

9497
## The logfile will be rotated after the time interval specified. When set
@@ -109,9 +112,9 @@
109112
{{ config.agent | manala.roles.toml_parameter('log_with_timezone', default='', comment=true) }}
110113

111114
## Override default hostname, if empty use os.Hostname()
112-
{{ config.agent | manala.roles.toml_parameter('hostname', default='') }}
115+
{{ config.agent | manala.roles.toml_parameter('hostname', default='', comment=true) }}
113116
## If set to true, do no set the "host" tag in the telegraf agent.
114-
{{ config.agent | manala.roles.toml_parameter('omit_hostname', default=false) }}
117+
{{ config.agent | manala.roles.toml_parameter('omit_hostname', default=false, comment=true) }}
115118

116119
## Method of translating SNMP objects. Can be "netsnmp" (deprecated) which
117120
## translates by calling external programs snmptranslate and snmptable,
@@ -123,3 +126,8 @@
123126
## stateful plugins on termination of Telegraf. If the file exists on start,
124127
## the state in the file will be restored for the plugins.
125128
{{ config.agent | manala.roles.toml_parameter('statefile', default='', comment=true) }}
129+
130+
## Flag to skip running processors after aggregators
131+
## By default, processors are run a second time after aggregators. Changing
132+
## this setting to true will skip the second run of processors.
133+
{{ config.agent | manala.roles.toml_parameter('skip_processors_after_aggregators', default=false, comment=true) }}

0 commit comments

Comments
 (0)