PrometheusRule interface
An Azure Prometheus alerting or recording rule.
Properties
| actions | Actions that are performed when the alert rule becomes active, and when an alert condition is resolved. |
| alert | Alert rule name. |
| annotations | The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated. |
| enabled | Enable/disable rule. |
| expression | The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'. |
| for | The amount of time alert must be active before firing. |
| labels | Labels to add or overwrite before storing the result. |
| record | Recorded metrics name. |
| resolve |
Defines the configuration for resolving fired alerts. Only relevant for alerts. |
| severity | The severity of the alerts fired by the rule. Must be between 0 and 4. |
Property Details
actions
Actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
actions?: PrometheusRuleGroupAction[]
Property Value
alert
Alert rule name.
alert?: string
Property Value
string
annotations
The annotations clause specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links. The annotation values can be templated.
annotations?: Record<string, string>
Property Value
Record<string, string>
enabled
Enable/disable rule.
enabled?: boolean
Property Value
boolean
expression
The PromQL expression to evaluate. https://prometheus.io/docs/prometheus/latest/querying/basics/. Evaluated periodically as given by 'interval', and the result recorded as a new set of time series with the metric name as given by 'record'.
expression: string
Property Value
string
for
The amount of time alert must be active before firing.
for?: string
Property Value
string
labels
Labels to add or overwrite before storing the result.
labels?: Record<string, string>
Property Value
Record<string, string>
record
Recorded metrics name.
record?: string
Property Value
string
resolveConfiguration
Defines the configuration for resolving fired alerts. Only relevant for alerts.
resolveConfiguration?: PrometheusRuleResolveConfiguration
Property Value
severity
The severity of the alerts fired by the rule. Must be between 0 and 4.
severity?: number
Property Value
number