Add Alertmanger metric target(s)

This commit enables scraping of Alertmanager metrics.

Change-Id: I69f4ac7de0f95eff393d9658af396e3c04824c8f
This commit is contained in:
Piotr Parczewski 2021-03-22 12:53:44 +01:00
parent 1e984f56b6
commit 5a6cafa210
2 changed files with 11 additions and 0 deletions

View File

@ -128,6 +128,13 @@ scrape_configs:
{% endif %}
{% if enable_prometheus_alertmanager | bool %}
- job_name: alertmanager
static_configs:
- targets:
{% for host in groups['prometheus-alertmanager'] %}
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_alertmanager_port'] }}'
{% endfor %}
alerting:
alertmanagers:
- static_configs:

View File

@ -0,0 +1,4 @@
---
features:
- |
Add support for Alertmanager metrics scraping in Prometheus.