Initial version

This commit is contained in:
Werner Dijkerman
2015-09-20 14:13:54 +02:00
commit 03adb259af
15 changed files with 439 additions and 0 deletions

View File

@ -0,0 +1,52 @@
# Telegraf configuration
[tags]
{% if telegraf_agent_tags is defined and telegraf_agent_tags is iterable %}
{% for item in telegraf_agent_tags %}
{{ item.tag_name }} = "{{ item.tag_value }}"
{% endfor %}
{% endif %}
# Configuration for telegraf itself
[agent]
interval = "{{ telegraf_agent_interval }}s"
debug = {{ telegraf_agent_debug | lower }}
hostname = "{{ ansible_fqdn }}"
utc = {{ telegraf_agent_utc | lower }}
precision = "{{ telegraf_agent_precision }}"
# Configuration for influxdb server to send metrics to
[outputs]
{% if telegraf_agent_output is defined and telegraf_agent_output is iterable %}
{% for item in telegraf_agent_output %}
[outputs.{{ item.type }}]
{% for items in item.config %}
{{ items }}
{% endfor %}
{% endfor %}
{% endif %}
# PLUGINS
{% if telegraf_plugins_default is defined and telegraf_plugins_default is iterable %}
{% for item in telegraf_plugins_default %}
[{{ item.plugin }}]
{% if item.config is defined and item.config is iterable %}
{% for items in item.config %}
{{ items }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% if telegraf_plugins_extra is defined and telegraf_plugins_extra is iterable %}
{% for item in telegraf_plugins_extra %}
[{{ item.plugin }}]
{% if item.config is defined and item.config is iterable %}
{% for items in item.config %}
{{ items }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}