Skip to content

v1.22.0

Choose a tag to compare

@loks0n loks0n released this 14 Aug 16:35
· 5 commits to main since this release
b39561f

Discord templates for Alertmanager and Grafana Alerting

A card rendered from an Alertmanager alert was 29 lines, because there were no discord_* templates and the templater falls back to the web templates, which list every label and annotation under three headings.

The same alert now renders as:

Synthetic test failed two consecutive runs.

name: backups-tor
alert_rule_uid: afsxq6b2qb85cb
cluster: assets-fra1-prod
kind: PlaywrightTest
service: backups
team: databases

orgId: 1
values: {"A":0,"B":0,"C":0}

Every label and annotation is kept, one per line, with its name. No label name is special cased. What is removed is only what appears elsewhere:

removed shown instead
alertname the card title
severity the title emoji and the forum tag
value_string values, when the payload has one
a key present in both labels and annotations printed once
__dashboardUid__, __panelId__ reserved by Grafana and hidden in its own UI
dashboard_url, dashboardURL the Dashboard button
Severity: and Status: lines the title emoji and the timeline

Legacy payloads that carry labels and annotations at the top level are read as well. A rule that sets both a summary and a description shows both.

Backend specific template defaults

get_default_template_attribute sent every extra messaging backend to the web templates. It now uses a backend's own template when the integration defines one and falls back to web otherwise, so Mattermost is unaffected. Any backend can define templates by adding <backend>_<attr> to an integration config.

Only alertmanager and grafana_alerting define Discord templates. Other integrations keep their web templates.

Source and Dashboard buttons

The source link button was labelled Dashboard for the Grafana and Alertmanager integrations. For a Grafana managed rule that link opens the rule, not a dashboard.

  • The source link button is labelled Source.
  • A dashboard link found in dashboard_url or dashboardURL, in either the common or top level annotations, gets a Dashboard button.
  • Both appear only when the two links differ.

Full Changelog: v1.21.4...v1.22.0