Skip to content
Snippets Groups Projects
Commit 10f0e9dd authored by Mark Goddard's avatar Mark Goddard
Browse files

prometheus: Add friendly instance labels for ironic and alertmanager

These were omitted from I387c9d8f5c01baf6054381834ecf4e554d0fff35 and
I387c9d8f5c01baf6054381834ecf4e554d0fff35.

Closes-Bug: #2041855
Change-Id: I25e5450d1caeebd9c900c190fc0079988f1ca574
parent e513ddd9
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,10 @@ scrape_configs:
static_configs:
{% for host in groups['ironic-conductor'] %}
- targets: ["{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['ironic_prometheus_exporter_port'] }}"]
{% if hostvars[host].prometheus_instance_label | default(false, true) %}
labels:
instance: "{{ hostvars[host].prometheus_instance_label }}"
{% endif %}
{% endfor %}
{% endif %}
......@@ -247,5 +251,9 @@ alerting:
- targets:
{% for host in groups["prometheus-alertmanager"] %}
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_port'] }}'
{% if hostvars[host].prometheus_instance_label | default(false, true) %}
labels:
instance: "{{ hostvars[host].prometheus_instance_label }}"
{% endif %}
{% endfor %}
{% endif %}
---
fixes:
- |
Adds missing support for friendly labels for Prometheus Ironic exporter and
Alertmanager metrics. `LP#2041855
<https://bugs.launchpad.net/kolla-ansible/+bug/2041855>`__
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