@@ -24,7 +24,7 @@ scrape_configs:
2424 static_configs:
2525{% for host in groups ['prometheus' ] %}
2626 - targets:
27- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ prometheus_port }}'
27+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ prometheus_port }}'
2828{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
2929 labels:
3030 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -36,7 +36,7 @@ scrape_configs:
3636 static_configs:
3737{% for host in groups ['prometheus-node-exporter' ] %}
3838 - targets:
39- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_node_exporter_port'] }}'
39+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_node_exporter_port'] }}'
4040{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
4141 labels:
4242 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -56,7 +56,7 @@ scrape_configs:
5656 static_configs:
5757{% for host in groups ['prometheus-mysqld-exporter' ] %}
5858 - targets:
59- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_mysqld_exporter_port'] }}'
59+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_mysqld_exporter_port'] }}'
6060{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
6161 labels:
6262 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -69,7 +69,7 @@ scrape_configs:
6969 static_configs:
7070{% for host in groups ['loadbalancer' ] %}
7171 - targets:
72- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ prometheus_haproxy_exporter_port }}'
72+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ prometheus_haproxy_exporter_port }}'
7373{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
7474 labels:
7575 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -82,7 +82,7 @@ scrape_configs:
8282 static_configs:
8383{% for host in groups ['rabbitmq' ] %}
8484 - targets:
85- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_rabbitmq_exporter_port'] }}'
85+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_rabbitmq_exporter_port'] }}'
8686{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
8787 labels:
8888 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -95,7 +95,7 @@ scrape_configs:
9595 static_configs:
9696{% for host in groups ['prometheus-memcached-exporter' ] %}
9797 - targets:
98- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_memcached_exporter_port'] }}'
98+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_memcached_exporter_port'] }}'
9999{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
100100 labels:
101101 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -108,7 +108,7 @@ scrape_configs:
108108 static_configs:
109109{% for host in groups ["prometheus-cadvisor" ] %}
110110 - targets:
111- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_cadvisor_port'] }}'
111+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_cadvisor_port'] }}'
112112{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
113113 labels:
114114 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -121,7 +121,7 @@ scrape_configs:
121121 static_configs:
122122{% for host in groups ['fluentd' ] %}
123123 - targets:
124- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_fluentd_integration_port'] }}'
124+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_fluentd_integration_port'] }}'
125125{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
126126 labels:
127127 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -159,7 +159,7 @@ scrape_configs:
159159 static_configs:
160160{% for host in groups ["prometheus-elasticsearch-exporter" ] %}
161161 - targets:
162- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_elasticsearch_exporter_port'] }}'
162+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_elasticsearch_exporter_port'] }}'
163163{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
164164 labels:
165165 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -204,7 +204,7 @@ scrape_configs:
204204 static_configs:
205205{% for host in groups ["prometheus-libvirt-exporter" ] %}
206206 - targets:
207- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_libvirt_exporter_port'] }}'
207+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_libvirt_exporter_port'] }}'
208208{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
209209 labels:
210210 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -220,7 +220,7 @@ scrape_configs:
220220 static_configs:
221221{% for host in groups ["etcd" ] %}
222222 - targets:
223- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_etcd_integration_port'] }}'
223+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_etcd_integration_port'] }}'
224224{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
225225 labels:
226226 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -232,7 +232,8 @@ scrape_configs:
232232 - job_name: ironic_prometheus_exporter
233233 static_configs:
234234{% for host in groups ['ironic-conductor' ] %}
235- - targets: ["{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['ironic_prometheus_exporter_port'] }}"]
235+ - targets:
236+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address') | put_address_in_context('url') }}:{{ hostvars[host] ['ironic_prometheus_exporter_port'] }}'
236237{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
237238 labels:
238239 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -245,7 +246,7 @@ scrape_configs:
245246 static_configs:
246247{% for host in groups ['prometheus-alertmanager' ] %}
247248 - targets:
248- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_alertmanager_port'] }}'
249+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_alertmanager_port'] }}'
249250{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
250251 labels:
251252 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -257,7 +258,7 @@ scrape_configs:
257258 static_configs:
258259{% for host in groups ["loadbalancer" ] %}
259260 - targets:
260- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['proxysql_prometheus_exporter_port'] }}'
261+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['proxysql_prometheus_exporter_port'] }}'
261262{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
262263 labels:
263264 instance: "{{ hostvars[host] .prometheus_instance_label }}"
@@ -270,7 +271,7 @@ alerting:
270271 - static_configs:
271272{% for host in groups ["prometheus-alertmanager" ] %}
272273 - targets:
273- - '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_alertmanager_port'] }}'
274+ - '{{ 'api' | kolla_address(host, override_var='prometheus_target_address' ) | put_address_in_context('url') }}:{{ hostvars[host] ['prometheus_alertmanager_port'] }}'
274275{% if hostvars [host ].prometheus_instance_label | default (false , true ) %}
275276 labels:
276277 instance: "{{ hostvars[host] .prometheus_instance_label }}"
0 commit comments