prometheus operator v0.93.1

PrometheusRule.spec.groups.rules

rules defines the list of alerting and recording rules.

7 fields
PrometheusRule.spec.groups.rules fields and descriptions
Field / TypeDescription
alert
string

alert defines the name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set.

map[string]string

annotations defines annotations to add to each alert. Only valid for alerting rules.

integer | string required

expr defines the PromQL expression to evaluate.

  • x-kubernetes-int-or-string: true
for
string

for defines how alerts are considered firing once they have been returned for this long.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
keep_firing_for
string

keep_firing_for defines how long an alert will continue firing after the condition that triggered it has cleared.

  • minLength: 1
  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
map[string]string

labels defines labels to add or overwrite.

record
string

record defines the name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set.