Reference

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:
  { ... }
KeyTypeNotes
kind"AlertRule"Selects the reconciler. Required.
metadata.namestringThe rule's slug and identity. Required, non-empty.
specobjectThe rule contents, below.

spec

FieldTypeRequiredNotes
evaluationIntervalstringyesHow often the query runs. <int><s|m|h|d>, minimum 1m.
querystringyesClickHouse SQL. Every returned row is a firing instance; empty = resolved. No ${...} templating.
notificationMessageobjectyesThe notification text. See below.
notificationMessage.titlestringyesSupports ${column}. Non-empty.
notificationMessage.descriptionstringnoSupports ${column}.
instanceLabels[string]noOverride for instance identity; ≥1 entry when present. Default identity is all string columns the query returns.
displayobjectnoname 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"
FieldTypeNotes
repoidstringExplicit 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

  • evaluationInterval must be ≥ 1m.
  • notificationMessage.title is required and non-empty.
  • ${column} must reference a column the query returns.
  • instanceLabels needs ≥1 entry when present.
  • query rejects ${...}.
  • Supported document kinds for apply are Dashboard and AlertRule.