Skip to content

Alert Template

A severity-based template for monitoring alerts. Displays firing alerts with deep-link buttons to dashboards and alert rules.

Fields

FieldTypeDescription
templatestringRequired. Must be "alert"
progressfloatRequired. Usually 0.0 for firing, 1.0 for resolved
severitystringRequired. Alert severity: "critical", "warning", or "info"
fired_atintegerUnix timestamp when the alert fired
urlstringPrimary URL -- tappable button on the Live Activity (e.g. link to alert rule)
secondary_urlstringSecondary URL -- second tappable button (e.g. link to dashboard panel)
statestringAlert description (e.g. "CPU usage is 94.2%")
iconstringSF Symbol name (e.g. "exclamationmark.triangle.fill") or MDI icon with mdi: prefix (e.g. "mdi:alert-circle")
subtitlestringSource and target (e.g. "Grafana - nas-01")
accent_colorstringNamed color or hex (typically "red" for firing, "green" for resolved)
background_colorstringBackground color override
text_colorstringText color override

Example: Firing Alert

Alert firing
{
  "state": "ONGOING",
  "content": {
    "template": "alert",
    "progress": 0.0,
    "state": "CPU usage is 94.2%",
    "icon": "exclamationmark.triangle.fill",
    "subtitle": "Grafana · nas-01",
    "severity": "critical",
    "fired_at": 1750009000,
    "accent_color": "red",
    "url": "https://grafana.example.com/alerting/1afz29v7z/edit",
    "secondary_url": "https://grafana.example.com/d/abc123?viewPanel=1"
  }
}

Example: Resolved Alert

Alert resolved
{
  "state": "ENDED",
  "content": {
    "template": "alert",
    "progress": 1.0,
    "state": "Resolved — CPU usage normalized",
    "icon": "checkmark.circle.fill",
    "subtitle": "Grafana · nas-01",
    "severity": "critical",
    "accent_color": "green",
    "url": "https://grafana.example.com/alerting/1afz29v7z/edit"
  }
}

Typical Flow

  1. Alert fires (ENDED -> ONGOING): Show the alert with severity, fired_at, and deep-link URLs
  2. Alert resolves (ONGOING -> ENDED): Update with resolved status and green accent
Info

The url and secondary_url fields render as tappable buttons on the Live Activity. Tapping them opens the URL in Safari.

Integrations Using This Template

  • Relay — forwards Grafana, Uptime Kuma, and Gatus alerts with deep links
  • Home Assistant — configurable via the template option in entity config