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 identity (the repoid) is inferred automatically from the repository's origin git remote, normalized to the slug host/owner/repo: scheme, credentials, port, a trailing .git, and trailing slashes are stripped and the result is lowercased. For example, git@github.com:Acme/API.git becomes github.com/acme/api. Equivalent ssh, https, and scp clone URLs collapse to the same identity, so one repo means one boundary.
No manifest file is needed when the repo has an origin remote. An optional everr.yaml (or everr.yml) at the apply root overrides the inferred identity. It accepts exactly one key:
# everr/everr.yaml
repoid: "my-explicit-id"| Field | Type | Notes |
|---|---|---|
repoid | string | Explicit identity override. When present it always wins over the inferred slug. Use it for local-only repositories, non-git directories, or when you need to pin an explicit name. The manifest rejects any other key. |
If there is neither an origin remote nor an everr.yaml manifest, apply errors and tells you to add a remote or create everr.yaml.
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.