Bug 2010357 - OpenShift Alerting Rules Style-Guide Compliance
Summary: OpenShift Alerting Rules Style-Guide Compliance
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jeff Cantrill
QA Contact: Anping Li
Whiteboard: logging-exploration, logging-core
Depends On:
TreeView+ depends on / blocked
Reported: 2021-10-04 13:53 UTC by Brad Ison
Modified: 2021-10-12 13:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-10-12 13:40:49 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Brad Ison 2021-10-04 13:53:50 UTC

The OpenShift Monitoring Team has published a set guidelines for
writing alerting rules in OpenShift, including a basic style guide.
You can find these here:


A subset of these are now being enforced in OpenShift End-to-End
tests [1], with temporary exceptions for existing non-compliant rules.

This component was found to have the following issues:

* Alerts found to not include a namespace label:

  - FluentDHighErrorRate
  - FluentDVeryHighErrorRate
  - FluentdNodeDown

Alerts SHOULD include a namespace label indicating the alert's source.

This requirement originally comes from our SRE team, as they use the
namespace label as the first means of routing alerts. Many alerts
already include a namespace label as a result of the PromQL
expressions used, others may require a static label.

Example of a change to PromQL to include a namespace label:


Example of adding a static namespace label:


If you have questions about how to best to modify your alerting rules
to include a namespace label, please reach out to the OpenShift
Monitoring Team in the #forum-monitoring channel on Slack, or on our
mailing list: team-monitoring

Thank you!

Repo: openshift/cluster-logging-operator

[1]: https://github.com/openshift/origin/commit/097e7a6

Comment 1 Jeff Cantrill 2021-10-12 13:40:49 UTC
Closing in favor of https://issues.redhat.com/browse/LOG-1823 given OpenShift Logging post OCP 4.6 tracks in JIRA

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