AlertRule Spec
The full AlertRule file format, the apply manifest, and the alert evaluation states.
An AlertRule is a resource with three top-level keys. Everr validates it on everr apply and again on read. The spec holds a ClickHouse query whose every returned row is a firing instance, plus the notification text to send when instances start and stop firing.
kind: AlertRule
metadata:
name: <slug>
spec:
{ ... }| Key | Type | Notes |
|---|---|---|
kind | "AlertRule" | Selects the reconciler. Required. |
metadata.name | string | The rule's slug and identity. Required, non-empty. |
spec | object | The rule contents, below. |
spec
| Field | Type | Required | Notes |
|---|---|---|---|
evaluationInterval | string | yes | How often the query runs. <int><s|m|h|d>, minimum 1m. |
query | string | yes | ClickHouse SQL. Every returned row is a firing instance; empty = resolved. No ${...} templating. |
notificationMessage | object | yes | The notification text. See below. |
notificationMessage.title | string | yes | Supports ${column}. Non-empty. |
notificationMessage.description | string | no | Supports ${column}. |
instanceLabels | [string] | no | Override for instance identity; ≥1 entry when present. Default identity is all string columns the query returns. |
display | object | no | name and/or description, both optional. Human-facing labels. |
Message templating
notificationMessage.title and notificationMessage.description support ${column} placeholders. Each placeholder is replaced with that firing instance's value for the named column, so one query produces one tailored message per instance.
Every referenced name must be a column the query returns; this is validated on apply. A missing or null value renders as empty text. The query SQL itself does not support templating, placeholders work only in the notification message fields.
Manifest
The apply directory — by convention an everr/ directory at your repo root — needs an everr.yaml (or everr.yml) file at its root with exactly one key:
# everr/everr.yaml
repoid: "2f8e3f90-9d1c-5d5f-a0f9-2d8e7f4a25d1"| Field | Type | Notes |
|---|---|---|
repoid | string (UUID) | Stable identifier you choose once. It's the reconcile/prune boundary, apply only touches resources under this repoid. The manifest rejects any other key. |
Declarations sit flat in everr/, named by kind: *.alert.yaml, *.dashboard.yaml, *.runbook.yaml (the legacy *.notebook.yaml suffix is still recognized). everr apply ./everr discovers every kind: Dashboard, kind: AlertRule, and kind: Runbook document under the directory and makes the live resources for that repoid exactly match the tree: new documents are created, changed ones updated, and removed ones deleted. The kind suffix is a naming convention only — apply routes by the kind: field. Use --preview to stage the changes for review without touching the live state (preview rules evaluate but never notify). See the everr apply reference.
Constraints and errors
evaluationIntervalmust be ≥1m.notificationMessage.titleis required and non-empty.${column}must reference a column thequeryreturns.instanceLabelsneeds ≥1 entry when present.queryrejects${...}.- Supported document kinds for apply are
DashboardandAlertRule.