Merge "Fix prometheus.yml templating"

This commit is contained in:
Zuul 2024-08-20 11:26:37 +00:00 committed by Gerrit Code Review
commit 4615f247fc
2 changed files with 7 additions and 2 deletions

View File

@ -255,8 +255,8 @@ scrape_configs:
alerting:
alertmanagers:
- static_configs:
- targets:
{% for host in groups["prometheus-alertmanager"] %}
- targets:
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_port'] }}'
{% if hostvars[host].prometheus_instance_label | default(false, true) %}
labels:

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixed an issue with the ``prometheus.yml`` template which would break when
deploying alertmanager.