aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-20 14:00:57 +0000
committerGerrit Code Review <review@openstack.org>2016-10-20 14:00:57 +0000
commit7c2cea50f547930eb95ffcf4abe740d6442599ba (patch)
treef29ad003ff60068d56c544cbc98fae42adab7979 /ansible
parentb90f768724ff0d6f953afb942f31ae653174fd29 (diff)
parent0c60cbe8de082fcd77758dc1c861c48b7d220f32 (diff)
downloadkolla-7c2cea50f547930eb95ffcf4abe740d6442599ba.tar.gz
kolla-7c2cea50f547930eb95ffcf4abe740d6442599ba.zip
Merge "Collect haproxy/elasticsearch/memcached metrics only on related hosts"
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/telegraf/templates/telegraf.conf.j28
1 files changed, 4 insertions, 4 deletions
diff --git a/ansible/roles/telegraf/templates/telegraf.conf.j2 b/ansible/roles/telegraf/templates/telegraf.conf.j2
index 0788f854d..457afa021 100644
--- a/ansible/roles/telegraf/templates/telegraf.conf.j2
+++ b/ansible/roles/telegraf/templates/telegraf.conf.j2
@@ -33,21 +33,21 @@ files = ["/var/log/kolla/**.log"]
[[inputs.system]]
[[inputs.net]]
interfaces = []
-{% if enable_haproxy | bool %}
+{% if inventory_hostname in groups['haproxy'] and enable_haproxy | bool %}
[[inputs.haproxy]]
servers = ["{{ haproxy_proto }}://{{ haproxy_user }}:{{ haproxy_password }}@{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ haproxy_stats_port }}"]
{% endif %}
-{% if enable_memcached | bool %}
+{% if inventory_hostname in groups['memcached'] and enable_memcached | bool %}
[[inputs.memcached]]
servers = ["{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}"]
{% endif %}
-{% if enable_elasticsearch | bool %}
+{% if inventory_hostname in groups['elasticsearch'] and enable_elasticsearch | bool %}
[[inputs.elasticsearch]]
servers = ["{{ elasticsearch_proto }}://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ elasticsearch_port }}"]
local = true
cluster_health = true
{% endif %}
-{% if inventory_hostname in groups['rabbitmq'] %}
+{% if inventory_hostname in groups['rabbitmq'] and enable_rabbitmq | bool %}
[[inputs.rabbitmq]]
url = "{{ rabbitmq_proto }}://{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ rabbitmq_management_port }}"
username = "{{ rabbitmq_user }}"