Merge "Telegraf should only output to influxdb when influxdb is enabled"

This commit is contained in:
Zuul 2017-11-28 14:47:57 +00:00 committed by Gerrit Code Review
commit 8ad8342bc1

View File

@ -11,12 +11,14 @@
quiet = false
hostname = ""
omit_hostname = false
{% if enable_influxdb | bool %}
[[outputs.influxdb]]
urls = [{% for host in groups['influxdb'] %}"{{ influxdb_proto }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address']}}:{{ influxdb_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
database = "telegraf" # required
retention_policy = "autogen"
write_consistency = "any"
timeout = "5s"
{% endif %}
[[inputs.cpu]]
percpu = true
totalcpu = true