3.1 KiB
3.1 KiB
| page_title | subcategory | description |
|---|---|---|
| stackit_observability_alertgroup Resource - stackit | Observability alert group resource schema. Used to create alerts based on metrics (Thanos). Must have a region specified in the provider configuration. |
stackit_observability_alertgroup (Resource)
Observability alert group resource schema. Used to create alerts based on metrics (Thanos). Must have a region specified in the provider configuration.
Example Usage
resource "stackit_observability_alertgroup" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-alert-group"
interval = "60s"
rules = [
{
alert = "example-alert-name"
expression = "kube_node_status_condition{condition=\"Ready\", status=\"false\"} > 0"
for = "60s"
labels = {
severity = "critical"
},
annotations = {
summary : "example summary"
description : "example description"
}
},
{
alert = "example-alert-name-2"
expression = "kube_node_status_condition{condition=\"Ready\", status=\"false\"} > 0"
for = "1m"
labels = {
severity = "critical"
},
annotations = {
summary : "example summary"
description : "example description"
}
},
]
}
Schema
Required
instance_id(String) Observability instance ID to which the alert group is associated.name(String) The name of the alert group. Is the identifier and must be unique in the group.project_id(String) STACKIT project ID to which the alert group is associated.rules(Attributes List) Rules for the alert group (see below for nested schema)
Optional
interval(String) Specifies the frequency at which rules within the group are evaluated. The interval must be at least 60 seconds and defaults to 60 seconds if not set. Supported formats include hours, minutes, and seconds, either singly or in combination. Examples of valid formats are: '5h30m40s', '5h', '5h30m', '60m', and '60s'.
Read-Only
id(String) Terraform's internal resource ID. It is structured as "project_id,instance_id,name".
Nested Schema for rules
Required:
alert(String) The name of the alert rule. Is the identifier and must be unique in the group.expression(String) The PromQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending/firing alerts.
Optional:
annotations(Map of String) A map of key:value. Annotations to add or overwrite for each alertfor(String) Alerts are considered firing once they have been returned for this long. Alerts which have not yet fired for long enough are considered pending. Default is 0slabels(Map of String) A map of key:value. Labels to add or overwrite for each alert