Alerts
Define alert rules with condition types, severity levels, dedup, and multi-channel escalation. Supports M-of-N evaluation and composite alarms.
AlertRuleSpec
- Condition types:
FieldAbove,FieldBelow,Expression(CEL-like syntax) - Severity: Info, Warning, Critical, Fatal
- Dedup key: String template for grouping duplicate alerts
- Entity filter: Glob or regex to scope which entities trigger
Escalation Chains
| Action | Config Fields |
|---|---|
| LogConsole | level (trace/debug/info/warn/error) |
| Webhook | url, method, headers, body_template |
| to, subject_template, body_template |
M-of-N Evaluation
Require M out of the last N data points to breach the threshold before firing. Reduces noise from transient spikes.
Composite Alarms
Combine multiple rules with boolean logic: AND, OR, NOT. Enables complex multi-signal conditions.
YAML Example
YAML
alerts:
- name: high_temperature
condition:
type: FieldAbove
field: temperature
threshold: 38.0
severity: Critical
dedup_key: "temp-{entity_id}"
entity_filter: "zone-*"
evaluation:
m: 3
n: 5
escalation:
- LogConsole: { level: warn }
- Webhook:
url: https://hooks.example.com/alerts
method: POST
body_template: '{"alert": "{{name}}", "value": {{value}}}'
suppression:
windows:
- { start: "02:00", end: "06:00", days: [Sat, Sun] }
composites:
- name: hvac_failure
operator: AND
rules: [high_temperature, fan_stopped]
severity: Fatal YAML Configuration
yaml AlertRuleSpec auto-generated
| Field | Type | Default | Description |
|---|---|---|---|
| id* | String | — | Unique rule identifier. |
| condition* | AlertConditionSpec | — | Condition that triggers the alert. |
| severity | Severity | — | Severity level of generated alerts. |
Example YAML
alerts:
- id: high_temp_zone_a
severity: critical
enabled: true
description: "Zone A temperature exceeds safe threshold"
evaluation_periods: 3
datapoints_to_alarm: 2
missing_data_policy: not_breaching
dedup_key: "temp-{entity_id}"
tags: [hvac, safety]
condition:
type: FieldAbove
field: temperature
threshold: 38.0
entity_filter: "zone-*"
escalation:
- LogConsole: { level: warn }
- Webhook:
url: https://hooks.example.com/alerts
method: POST
body_template: '{"alert": "{{id}}", "value": {{value}}}' Questions?
Reach out for help with integration, deployment, or custom domain codecs.