diff --git a/templates/etc-opt-telegraf-telegraf.conf.j2 b/templates/etc-opt-telegraf-telegraf.conf.j2 index 8fd16d7..eb32f9b 100644 --- a/templates/etc-opt-telegraf-telegraf.conf.j2 +++ b/templates/etc-opt-telegraf-telegraf.conf.j2 @@ -30,11 +30,38 @@ {% if telegraf_plugins_default is defined and telegraf_plugins_default is iterable %} {% for item in telegraf_plugins_default %} [{{ item.plugin }}] +{% if item.interval is defined %} + interval = "{{ item.interval }}s" +{% endif %} {% if item.config is defined and item.config is iterable %} {% for items in item.config %} {{ items }} {% endfor %} {% endif %} +{% if item.tagpass is defined and item.tagpass is iterable %} +[{{ item.plugin }}.tagpass] +{% for items in item.tagpass %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.tagdrop is defined and item.tagdrop is iterable %} +[{{ item.plugin }}.tagdrop] +{% for items in item.tagdrop %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.pass is defined and item.pass is iterable %} +[{{ item.plugin }}.pass] +{% for items in item.pass %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.drop is defined and item.drop is iterable %} +[{{ item.plugin }}.drop] +{% for items in item.drop %} + {{ items }} +{% endfor %} +{% endif %} {% endfor %} {% endif %} @@ -42,11 +69,38 @@ {% if telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable %} {% for item in telegraf_plugins_extra %} [{{ item.plugin }}] +{% if item.interval is defined %} + interval = "{{ item.interval }}s" +{% endif %} {% if item.config is defined and item.config is iterable %} {% for items in item.config %} {{ items }} {% endfor %} {% endif %} +{% if item.tagpass is defined and item.tagpass is iterable %} +[{{ item.plugin }}.tagpass] +{% for items in item.tagpass %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.tagdrop is defined and item.tagdrop is iterable %} +[{{ item.plugin }}.tagdrop] +{% for items in item.tagdrop %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.pass is defined and item.pass is iterable %} +[{{ item.plugin }}.pass] +{% for items in item.pass %} + {{ items }} +{% endfor %} +{% endif %} +{% if item.drop is defined and item.drop is iterable %} +[{{ item.plugin }}.drop] +{% for items in item.drop %} + {{ items }} +{% endfor %} +{% endif %} {% endfor %} {% endif %} \ No newline at end of file