tags: give an option to use AWS tags as telegraf tags

From : https://github.com/rossmcdonald/telegraf

Add `telegraf_agent_aws_tags` boolean to enable AWS tag in telegraf agent
tags section.

Also add `telegraf_agent_aws_tags_prefix` to allow usage of a prefix on AWS tags name.
This commit is contained in:
gaelL
2017-09-22 16:50:42 +02:00
parent bd62e6316e
commit 5829b6bc02
5 changed files with 28 additions and 0 deletions

View File

@ -7,6 +7,12 @@
{% endfor %}
{% endif %}
{% if telegraf_agent_aws_tags == true and ec2_tags is defined and ec2_tags != None %}
{% for key, value in ec2_tags.tags.iteritems()%}
{{telegraf_agent_aws_tags_prefix}}{{ key }} = "{{ value }}"
{% endfor %}
{% endif %}
# Configuration for telegraf itself
[agent]
interval = "{{ telegraf_agent_interval }}s"

View File

@ -7,6 +7,12 @@
{% endfor %}
{% endif %}
{% if telegraf_agent_aws_tags == true and ec2_tags is defined and ec2_tags != None %}
{% for key, value in ec2_tags.tags.iteritems()%}
{{telegraf_agent_aws_tags_prefix}}{{ key }} = "{{ value }}"
{% endfor %}
{% endif %}
# Configuration for telegraf agent
[agent]
interval = "{{ telegraf_agent_interval }}s"