Grafana
Navi.sh supports both the modern Grafana unified alerting format and the legacy single-alert format. Alerts with status: "resolved" automatically close the corresponding incident.
/v1/events/grafana/{token}Setup in Grafana
- In the Navi.sh dashboard, go to Integrations → Grafana and copy your integration URL.
- In Grafana, go to Alerting → Contact points.
- Click Add contact point.
- Set Integration to Webhook.
- Set the URL to the integration URL you copied above:
https://api.navi.sh/v1/events/grafana/<token> - Leave HTTP Method as
POSTand Content-Type asapplication/json. - Click Test to send a test payload, then Save.
- Assign the contact point to your Notification policies or individual alert rules.
Auto-resolve
Each alert in the alerts[] array is processed independently. Grafana sets status: "resolved" when an alert recovers — Navi.sh matches it to the open incident by fingerprint (or labels.alertname as fallback).
Make sure the Send resolved notifications option is enabled in your contact point settings.
Field mapping
| Navi.sh incident field | Source |
|---|---|
| Title | annotations.summary → labels.alertname → top-level title → "Grafana Alert" |
| Description | annotations.description → annotations.message → top-level message |
| Severity | labels.severity |
| Dedup key | fingerprint → labels.alertname |
Legacy format
For older Grafana versions, a simple top-level payload is also supported:
{
"title": "High Memory Usage",
"message": "Memory usage exceeded the threshold on web-01",
"state": "alerting"
}POST /v1/events/grafana/{token}
Accepts Grafana unified alerting webhook payloads. Configure a Contact point of type Webhook in your Grafana alerting settings.
Both the modern unified alerting format (alerts[]) and the legacy single-alert format (top-level title/message) are supported. Auto-resolves alerts whose status is "resolved". Deduplicates by fingerprint or alertname label.
The token is generated in your navi.sh workspace under Integrations.
Payload schema
| Field | Type | Description |
|---|---|---|
alerts | array of GrafanaAlert | List of individual alert instances. |
commonAnnotations | object<string, string> | Annotations common to all alerts. |
commonLabels | object<string, string> | Labels common to all alerts. |
externalURL | string | Grafana instance URL. (example: http://grafana:3000) |
groupKey | string | Group identifier. (example: {}/{}:{alertname="HighCPU"}) |
groupLabels | object<string, string> | Labels used for grouping. |
message | string | Top-level message, used for legacy single-alert format. (example: CPU usage crossed threshold) |
receiver | string | Contact point name. (example: navi-sh) |
status | string (firing, resolved) | Overall group status. (example: firing) |
title | string | Top-level title, used for legacy single-alert format. (example: [FIRING:1] HighCPU) |
version | string | Payload version. (example: 1) |
alerts fields:
| Field | Type | Description |
|---|---|---|
annotations | object<string, string> | Alert annotations. Include summary (used as title) and description. |
endsAt | string | RFC3339 timestamp when the alert ended. (example: 0001-01-01T00:00:00Z) |
fingerprint | string | Unique fingerprint used for deduplication. (example: abc123def456) |
generatorURL | string | Link to the Grafana alert expression. (example: http://grafana:3000/alerting/abc123/view) |
labels | object<string, string> | Alert labels. Include alertname and severity. |
startsAt | string | RFC3339 timestamp when the alert started. (example: 2024-01-15T10:30:00Z) |
status | string (firing, resolved) | Alert status for this individual instance. (example: firing) |
values | object<string, string> | Current metric values (name to number mapping). |
Examples
Unified Alerting (Multi-Alert)
{
"alerts": [
{
"annotations": {
"description": "Pod memory critically high",
"summary": "Memory above 85%"
},
"fingerprint": "xyz789abc",
"labels": {
"alertname": "HighMemory",
"severity": "warning"
},
"startsAt": "2024-01-15T10:30:00Z",
"status": "firing"
}
],
"receiver": "navi-sh",
"status": "firing"
}Response codes
- 202 — Accepted — processing is asynchronous
- 400 — Invalid request body (malformed JSON or wrong content type)
- 401 — Invalid service token
- 500 — Unexpected server error