Merge "Telegraf should only output to influxdb when influxdb is enabled"
This commit is contained in:
commit
8ad8342bc1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user