Skip to main content

Alert Notifications

When a new alert group is created, Autoheal posts a message to your configured Slack channel and follows up with the investigation in that thread. You control what that message shows under Settings → Alert Response → Notify → Message format.

The alert name(s) and the Open Alert Group button always appear — everything else is configurable. A live preview on the settings page updates as you change things, so you see the exact layout before saving.

Defaults

A tenant that hasn't customized anything gets a curated default layout — you don't need to configure anything to get a useful message:

SettingDefault
Scope labelsservice, cluster, env (in that order)
SeverityShown
Source(s)Shown
SummaryShown
Other alert typesShown
Status breakdownHidden
Runbook linkHidden

These defaults render until you save a customization.

Fields

Toggle any of these on or off:

FieldShows
SeverityThe group's highest severity (e.g. Critical)
Source(s)The monitoring source(s), with per-source counts when there are several
SummaryA representative alert summary
Other alert typesThe other distinct alert names in the group
Status breakdownFiring / resolved counts
Runbook linkA Runbook button (see Runbook link below)

Scope labels

Scope labels are alert label values surfaced as fields (for example service: payments-api). Choose which labels to show and the order they appear — what you pick is what shows.

  • You can select up to 6 labels. Slack limits how many fields a single message section can hold, so the cap keeps the message valid for every configuration.
  • Labels render in the order you arrange them in the picker.
  • An alert group's full label set always remains on its detail page in Autoheal, regardless of what you surface here.

The Runbook button appears only when both are true:

  1. The Runbook link field is enabled, and
  2. The representative alert carries a runbook_url (or runbook) annotation whose value is an absolute http(s) URL.

Relative paths or unrendered template values are skipped, so a malformed runbook annotation can never break the rest of the message.

API

The same settings are available over the API:

  • GET /api/v1/alerts/notifications-config — the current configuration. An unconfigured tenant receives the resolved defaults, so a client always has a complete config to render.
  • PUT /api/v1/alerts/notifications-config — save the configuration.

The message_format object is all-or-nothing. Omit it entirely to leave the stored value untouched, or send the complete shape:

FieldRule
labelsThe ordered label keys. Required — send [] for no scope labels, not null. Max 6.
label_limitMust equal the number of labels (what you pick is what shows).
fieldsA complete map — every known field key must be present, no unknown keys.

A partial or incomplete message_format is rejected rather than silently completed from defaults, so your stored configuration always reflects exactly what you sent.