AlertingRule represents a set of user-defined Prometheus rule groups containing
alerting rules. This resource is the supported method for cluster admins to
create alerts based on metrics recorded by the platform monitoring stack in
OpenShift, i.e. the Prometheus instance deployed to the openshift-monitoring
namespace. You might use this to create custom alerting rules not shipped with
OpenShift based on metrics from components such as the node_exporter, which
provides machine-level metrics such as CPU usage, or kube-state-metrics, which
provides metrics on Kubernetes usage.
The API is mostly compatible with the upstream PrometheusRule type from the
prometheus-operator. The primary difference being that recording rules are not
allowed here — only alerting rules. For each AlertingRule resource created, a
corresponding PrometheusRule will be created in the openshift-monitoring
namespace. OpenShift requires admins to use the AlertingRule resource rather
than the upstream type in order to allow better OpenShift specific defaulting
and validation, while not modifying the upstream APIs directly.
You can find upstream API documentation for PrometheusRule resources here:
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).