تخطٍّ إلى المحتوى

قالب التنبيه

قالب قائم على الخطورة لتنبيهات المراقبة. يعرض التنبيهات المُطلقة مع أزرار روابط عميقة إلى لوحات المعلومات وقواعد التنبيه.

عرض توضيحي للنشاط المباشر

Fields

FieldTypeDescription
templatestringRequired. Must be "alert"
progressfloatRequired. Usually 0.0 for firing, 1.0 for resolved
severitystringRequired. Alert severity: "critical", "warning", or "info"
severity_labelstringOptional. Custom text shown in place of the Info/Warning/Critical badge
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
قادم في إصدار التطبيق 1.14.0

For one-tap acknowledgements, set url_action to a silent webhook, 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; the legacy url / secondary_url strings render as buttons that open in Safari. See Tap actions.

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": "critical",
    "severity_label": "SEV1",
    "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": "critical",
    "accent_color": "green",
    "url": "https://grafana.example.com/alerting/1afz29v7z/edit"
  }
}

The Relay forwards Grafana, Uptime Kuma and Gatus alerts into this template with deep links.