dj-wasabi / ansible-telegraf

Installing and configuring Telegraf via Ansible for RedHat/Debian/Ubuntu/Windows/Suse.
MIT License
134 stars 116 forks source link

miss filter for telegraf_agent_output #148

Open falon opened 3 years ago

falon commented 3 years ago

https://github.com/dj-wasabi/ansible-telegraf/blob/8e4b34d4bddd732e150faa6f971cce9392b2a2fb/templates/telegraf.conf.j2#L63

here you should add

{% if item.filter is defined %}
{% if item.filter.name is defined %}
    [outputs.{{ item.type }}.{{ item.filter.name }}]
{% if item.filter.config is defined and item.filter.config is iterable %}
{% for items in item.filter.config %}
        {{ items }}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}

many output agent need filters. For instance see at output.http.headers in output http plugin