updated telegraf state
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2022-06-28 23:21:35 +02:00
parent 703c10c312
commit 5ee366fd68

View File

@ -1,5 +1,12 @@
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "telegraf/map.jinja" import telegraf with context %} {%- from "telegraf/map.jinja" import telegraf with context %}
{% macro cfg(value) -%}
{% if value is not none -%}
{% 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 %}
[global_tags] [global_tags]
[agent] [agent]
interval = "1m" interval = "1m"
@ -15,18 +22,10 @@
{% for name, value in telegraf.config.outputs.items() -%} {% for name, value in telegraf.config.outputs.items() -%}
[[outputs.{{ name }}]] [[outputs.{{ name }}]]
{% if value is not none -%} {{ cfg(value) }}
{% 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 %}
{% endfor %} {% endfor %}
{% for name, value in telegraf.config.inputs.items() -%} {% for name, value in telegraf.config.inputs.items() -%}
[[inputs.{{ name }}]] [[inputs.{{ name }}]]
{% if value is not none -%} {{ cfg(value) }}
{% 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 %}
{% endfor -%} {% endfor -%}