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:

https://awesome-prometheus-alerts.grep.to/rules

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:

http://localhost:9093/metrics

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

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/1c5a0810-d916-4450-b579-7e56910788een%40googlegroups.com.

Reply via email to