mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
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:
@ -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"
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user