Fix tagpass & tagdrop on outputs

This commit is contained in:
Jeroen Geusebroek
2019-01-21 15:34:07 +01:00
parent 140597e41d
commit 07a6cb0135
3 changed files with 26 additions and 2 deletions

View File

@ -75,8 +75,8 @@ Specifying an output. The default is set to localhost, you'll have to specify th
config: config:
- urls = ["http://localhost:8086"] - urls = ["http://localhost:8086"]
- database = "telegraf" - database = "telegraf"
tagpass: tagpass:
- diskmetrics = ["true"] - diskmetrics = ["true"]
The config will be printed line by line into the configuration, so you could also use: The config will be printed line by line into the configuration, so you could also use:

View File

@ -27,6 +27,18 @@
{% for items in item.config %} {% for items in item.config %}
{{ items }} {{ items }}
{% endfor %} {% endfor %}
{% if item.tagpass is defined and item.tagpass is iterable %}
[outputs.{{ item.type }}.tagpass]
{% for items in item.tagpass %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.tagdrop is defined and item.tagdrop is iterable %}
[outputs.{{ item.type }}.tagdrop]
{% for items in item.tagdrop %}
{{ items }}
{% endfor %}
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@ -46,6 +46,18 @@
{% for items in item.config %} {% for items in item.config %}
{{ items }} {{ items }}
{% endfor %} {% endfor %}
{% if item.tagpass is defined and item.tagpass is iterable %}
[outputs.{{ item.type }}.tagpass]
{% for items in item.tagpass %}
{{ items }}
{% endfor %}
{% endif %}
{% if item.tagdrop is defined and item.tagdrop is iterable %}
[outputs.{{ item.type }}.tagdrop]
{% for items in item.tagdrop %}
{{ items }}
{% endfor %}
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}