Bug 1904161 - AlertmanagerReceiversNotConfigured fires unconditionally on alertmanager restart
Summary: AlertmanagerReceiversNotConfigured fires unconditionally on alertmanager restart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.7.0
Assignee: Rick Rackow
QA Contact: Junqi Zhao
URL:
Whiteboard:
: 1965406 (view as bug list)
Depends On:
Blocks: 1967938
TreeView+ depends on / blocked
 
Reported: 2020-12-03 18:10 UTC by Seth Jennings
Modified: 2024-03-25 17:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1967938 (view as bug list)
Environment:
Last Closed: 2021-02-24 15:37:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 992 0 None closed Bug 1904161: Use alertmanager_integrations metric instead of alertmanager_notifications_total for AlertmanagerReceiversN... 2021-02-12 13:13:49 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:39:59 UTC

Description Seth Jennings 2020-12-03 18:10:13 UTC
Description of problem:

The alerting rule for AlertmanagerReceiversNotConfigured has a bug.

The alerting expression is `cluster:alertmanager_routing_enabled:max == 0`

`cluster:alertmanager_routing_enabled:max` is rule `clamp_max(sum(alertmanager_notifications_total), 1)`

`alertmanager_notifications_total` is simply the number of notifications an alertmanager instance has sent since it started.  However, in a newly started alertmanager instance, this is 0.  Thus, until alertmanager has sent the first alert, AlertmanagerReceiversNotConfigured will fire.

Hilariously enough, AlertmanagerReceiversNotConfigured firing and triggering an alert increases alertmanager_notifications_total and resolves the alert.

The end result is that every time a customer upgrades or rolls out a new MachineConfig to workers (i.e. anything that causes all the alertmanager instances to restart), they will get this alert.

Version-Release number of selected component (if applicable):
4.6.6

How reproducible:
Always

Steps to Reproduce:
1. Configure alertmanager receivers
2. oc scale statefulset alertmanager-main --replicas=0
3. CVO will override and scale alertmanager back up
4. After 10m, AlertmanagerReceiversNotConfigured will fire

Actual results:
AlertmanagerReceiversNotConfigured fires when receivers are configured

Expected results:
AlertmanagerReceiversNotConfigured should not fire when receivers are configured

Additional info:

Comment 5 Junqi Zhao 2020-12-10 07:49:26 UTC
tested with 4.7.0-0.nightly-2020-12-09-112139, followed the steps in comment 0, AlertmanagerReceiversNotConfigured alert was not fired again
      - expr: clamp_max(sum(alertmanager_integrations),1)
        record: cluster:alertmanager_routing_enabled:max

Comment 9 errata-xmlrpc 2021-02-24 15:37:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633

Comment 10 Simon Pasquier 2021-06-04 13:18:45 UTC
*** Bug 1965406 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.