Alert Template
A severity-based template for monitoring alerts. Displays firing alerts with deep-link buttons to dashboards and alert rules.
Fields
| Field | Type | Description |
|---|---|---|
template | string | Required. Must be "alert" |
progress | float | Required. Usually 0.0 for firing, 1.0 for resolved |
severity | string | Required. Alert severity: "warning" or "info" |
fired_at | integer | Unix timestamp when the alert fired |
url | string | Primary URL -- tappable button on the Live Activity (e.g. link to alert rule) |
secondary_url | string | Secondary URL -- second tappable button (e.g. link to dashboard panel) |
state | string | Alert description (e.g. "CPU usage is 94.2%") |
icon | string | SF Symbol name (e.g. "exclamationmark.triangle.fill") or MDI icon with mdi: prefix (e.g. "mdi:alert-circle") |
subtitle | string | Source and target (e.g. "Grafana - nas-01") |
accent_color | string | Named color or hex (typically "red" for firing, "green" for resolved) |
background_color | string | Background color override |
text_color | string | Text color override |
Example: Firing Alert
{
"state": "ongoing",
"content": {
"template": "alert",
"progress": 0.0,
"state": "CPU usage is 94.2%",
"icon": "exclamationmark.triangle.fill",
"subtitle": "Grafana · nas-01",
"severity": "warning",
"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
{
"state": "ended",
"content": {
"template": "alert",
"progress": 1.0,
"state": "Resolved — CPU usage normalized",
"icon": "checkmark.circle.fill",
"subtitle": "Grafana · nas-01",
"severity": "warning",
"accent_color": "green",
"url": "https://grafana.example.com/alerting/1afz29v7z/edit"
}
}Typical Flow
- Alert fires (
ended -> ongoing): Show the alert withseverity,fired_at, and deep-link URLs - Alert resolves (
ongoing -> ended): Update with resolved status and green accent
The legacy url and secondary_url string fields render as tappable buttons that open in Safari. For richer behavior (silent webhooks, custom-scheme deep-links) use the structured url_action / secondary_url_action documented below.
Buttons & tap targets
The alert template is a natural fit for one-tap acknowledgements. Set url_action to a silent webhook (HTTP method with foreground absent or false) to ack from the Live Activity without launching the app, secondary_url_action with foreground: true to open the dashboard in Safari, and tap_action to a custom scheme to deep-link into your alerting tool's iOS app. See Tap actions for the action object shape.
Integrations Using This Template
- Relay — forwards Grafana, Uptime Kuma, and Gatus alerts with deep links
- Home Assistant — configurable via the
templateoption in entity config