2020-07-10 00:58:55 +02:00
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "telegraf/map.jinja" import telegraf with context %}
2022-06-28 23:21:35 +02:00
{% macro cfg(value) -%}
2024-03-20 15:02:47 +01:00
{% if value and value != 'None' -%}
2022-06-28 23:21:35 +02:00
{% for paramname, paramvalue in value.items() -%}
{{ ' ' }}{{ paramname }} = {% if paramvalue is sameas True or paramvalue is sameas False %}{{ paramvalue|string|lower }}{% elif paramvalue is iterable and paramvalue is not string %}[{{ paramvalue|join(",") }}]{% else %}"{{ paramvalue }}"{% endif %}
{% endfor %}
{%- endif %}
{%- endmacro %}
2020-07-10 00:58:55 +02:00
[global_tags]
[agent]
interval = "1m"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
2022-02-21 13:52:46 +01:00
flush_interval = "30s"
2020-07-10 00:58:55 +02:00
flush_jitter = "0s"
precision = ""
2020-10-25 16:37:55 +01:00
hostname = "{{ salt['grains.get']('fqdn') }}"
2020-07-10 00:58:55 +02:00
omit_hostname = false
2024-03-20 14:32:46 +01:00
{% for name, value in config.outputs.items() -%}
2021-08-18 07:10:35 +02:00
[[outputs.{{ name }}]]
2022-06-28 23:21:35 +02:00
{{ cfg(value) }}
2021-08-18 07:10:35 +02:00
{% endfor %}
2020-07-10 00:58:55 +02:00
2024-03-20 14:32:46 +01:00
{% for name, value in config.inputs.items() -%}
2020-07-10 00:58:55 +02:00
[[inputs.{{ name }}]]
2022-06-28 23:21:35 +02:00
{{ cfg(value) }}
2021-08-18 07:10:35 +02:00
{% endfor -%}