Skip to content

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.

POST/v1/events/grafana/{token}

Setup in Grafana ​

  1. In the Navi.sh dashboard, go to Integrations → Grafana and copy your integration URL.
  2. In Grafana, go to Alerting → Contact points.
  3. Click Add contact point.
  4. Set Integration to Webhook.
  5. Set the URL to the integration URL you copied above:
    https://api.navi.sh/v1/events/grafana/<token>
  6. Leave HTTP Method as POST and Content-Type as application/json.
  7. Click Test to send a test payload, then Save.
  8. 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 fieldSource
Titleannotations.summary → labels.alertname → top-level title → "Grafana Alert"
Descriptionannotations.description → annotations.message → top-level message
Severitylabels.severity
Dedup keyfingerprint → labels.alertname

Legacy format ​

For older Grafana versions, a simple top-level payload is also supported:

json
{
  "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 ​

FieldTypeDescription
alertsarray of GrafanaAlertList of individual alert instances.
commonAnnotationsobject<string, string>Annotations common to all alerts.
commonLabelsobject<string, string>Labels common to all alerts.
externalURLstringGrafana instance URL. (example: http://grafana:3000)
groupKeystringGroup identifier. (example: {}/{}:{alertname="HighCPU"})
groupLabelsobject<string, string>Labels used for grouping.
messagestringTop-level message, used for legacy single-alert format. (example: CPU usage crossed threshold)
receiverstringContact point name. (example: navi-sh)
statusstring (firing, resolved)Overall group status. (example: firing)
titlestringTop-level title, used for legacy single-alert format. (example: [FIRING:1] HighCPU)
versionstringPayload version. (example: 1)

alerts fields:

FieldTypeDescription
annotationsobject<string, string>Alert annotations. Include summary (used as title) and description.
endsAtstringRFC3339 timestamp when the alert ended. (example: 0001-01-01T00:00:00Z)
fingerprintstringUnique fingerprint used for deduplication. (example: abc123def456)
generatorURLstringLink to the Grafana alert expression. (example: http://grafana:3000/alerting/abc123/view)
labelsobject<string, string>Alert labels. Include alertname and severity.
startsAtstringRFC3339 timestamp when the alert started. (example: 2024-01-15T10:30:00Z)
statusstring (firing, resolved)Alert status for this individual instance. (example: firing)
valuesobject<string, string>Current metric values (name to number mapping).

Examples ​

Unified Alerting (Multi-Alert) ​

json
{
  "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
  • 402 — Workspace suspended (trial ended or plan lapsed): new alerts are rejected; resolutions are still accepted
  • 500 — Unexpected server error

Built by the Navi.sh team.