Skip to content
Snippets Groups Projects
Commit 01ccd0d3 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Fix telegraf output for influxdb"

parents 2210b602 7764ed98
No related branches found
No related tags found
No related merge requests found
...@@ -12,12 +12,14 @@ ...@@ -12,12 +12,14 @@
hostname = "" hostname = ""
omit_hostname = false omit_hostname = false
{% if enable_influxdb | bool %} {% if enable_influxdb | bool %}
{% for host in groups['influxdb'] %}
[[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 = ["{{ influxdb_proto }}://{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address']}}:{{ influxdb_http_port }}"]
database = "telegraf" # required database = "telegraf" # required
retention_policy = "autogen" retention_policy = "autogen"
write_consistency = "any" write_consistency = "any"
timeout = "5s" timeout = "5s"
{% endfor %}
{% endif %} {% endif %}
[[inputs.cpu]] [[inputs.cpu]]
percpu = true percpu = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment