Merge "Telegraf should only output to influxdb when influxdb is enabled"
This commit is contained in:
commit
8ad8342bc1
@ -11,12 +11,14 @@
|
|||||||
quiet = false
|
quiet = false
|
||||||
hostname = ""
|
hostname = ""
|
||||||
omit_hostname = false
|
omit_hostname = false
|
||||||
|
{% if enable_influxdb | bool %}
|
||||||
[[outputs.influxdb]]
|
[[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 %}]
|
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
|
database = "telegraf" # required
|
||||||
retention_policy = "autogen"
|
retention_policy = "autogen"
|
||||||
write_consistency = "any"
|
write_consistency = "any"
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
|
{% endif %}
|
||||||
[[inputs.cpu]]
|
[[inputs.cpu]]
|
||||||
percpu = true
|
percpu = true
|
||||||
totalcpu = true
|
totalcpu = true
|
||||||
|
Loading…
Reference in New Issue
Block a user