Hi all:
I am fairly new to Prometheus. I am using the Prometheus version 2.15.2 that comes with Ubuntu 20.04.
On this page:
I found this alert:
- alert: PrometheusNotConnectedToAlertmanager
expr: prometheus_notifications_alertmanagers_discovered < 1
for: 0m
labels:
severity: critical
annotations:
summary: Prometheus not connected to alertmanager (instance {{ $labels.instance }})
But it is not working properly. Metric prometheus_notifications_alertmanagers_discovered starts at 0, and then it goes to 1 as expected.
However, when I stop the service, it does not revert to 0:
systemctl stop prometheus-alertmanager.service
I checked that Alertmanager is not running by trying to load this URL:
By the way, my Prometheus configuration looks like this:
alerting:
alertmanagers:
- static_configs:
- targets: ['localhost:9093']
In fact, with prometheus-alertmanager.service still stopped, if I restart Prometheus, the value for prometheus_notifications_alertmanagers_discovered still goes from 0 to 1.
When I start the Alertmanager, then alerts are generated and the e-mails come through.
Is this a known issue with that Prometheus version?
Or is there a better way to check whether the connection between Prometheus and Alertmanager is healthy?
Thanks in advance,
rdiez