Export
Requiresalerts.rules.read. The query parameter ids takes rule ids separated by commas; empty exports every
rule. The response is a bundle:
escalation_policy is the name of the escalation policy, and absent for the default one; the
query.composite.rules of a composite rule name its child rules. The check-in address of a heartbeat
rule is not in the bundle.
Import
Requiresalerts.rules.manage.
Each rule is matched by name: a new name is created, a name with one rule compared field by field, and a
name with several rules fails, as does a name the file gives twice. Each rule is checked as saving a rule checks it. When any rule fails,
nothing is written; otherwise the import is written in one transaction, a federation change event is sent
for each rule, and one audit event
alert_rules.imported is recorded. See
Import and export for how a Prometheus rule becomes a
MoleSignal rule.
action is create, update, unchanged, skip (an existing rule with create_only), or error.
applied says whether anything was written.
Errors