monitoring.coreos.com / v1 / PrometheusRule
- string
.apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- string
.kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- object
.metadata
- object required
.spec
Specification of desired alerting rule definitions for Prometheus.
- array
.spec .groups
Content of Prometheus rule file
- string
.spec .groups[] .interval
Interval determines how often rules in the group are evaluated.
- object
.spec .groups[] .labels
Labels to add or overwrite before storing the result for its rules. The labels defined at the rule level take precedence.
It requires Prometheus >= 3.0.0. The field is ignored for Thanos Ruler.
- integer
.spec .groups[] .limit
Limit the number of alerts an alerting rule and series a recording rule can produce. Limit is supported starting with Prometheus >= 2.31 and Thanos Ruler >= 0.24.
- string required
.spec .groups[] .name
Name of the rule group.
- string
.spec .groups[] .partial_response_strategy
PartialResponseStrategy is only used by ThanosRuler and will be ignored by Prometheus instances. More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response
- string
.spec .groups[] .query_offset
Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.
It requires Prometheus >= v2.53.0. It is not supported for ThanosRuler.
- array
.spec .groups[] .rules
List of alerting and recording rules.
- string
.spec .groups[] .rules[] .alert
Name of the alert. Must be a valid label value. Only one of
record
andalert
must be set. - object
.spec .groups[] .rules[] .annotations
Annotations to add to each alert. Only valid for alerting rules.
- integer | string required
.spec .groups[] .rules[] .expr
PromQL expression to evaluate.
- string
.spec .groups[] .rules[] .for
Alerts are considered firing once they have been returned for this long.
- string
.spec .groups[] .rules[] .keep_firing_for
KeepFiringFor defines how long an alert will continue firing after the condition that triggered it has cleared.
- object
.spec .groups[] .rules[] .labels
Labels to add or overwrite.
- string
.spec .groups[] .rules[] .record
Name of the time series to output to. Must be a valid metric name. Only one of
record
andalert
must be set.