# Make Grafana alerts reach your phone.

> Get Grafana alerts as push notifications. Add Pocket Alert as a webhook contact point and catch firing alert rules on your phone in under a second.

<!-- source: https://pocketalert.app/use-cases/grafana-alerts -->

When a Grafana alert rule fires, the alert name, severity, and status land on your phone in under a second. See trouble before the dashboard turns red, without keeping a screen open.

## Three steps to Grafana alerts on your phone

1. **Create a webhook** — Create a Pocket Alert webhook with a GJSON message template and copy its receive URL.
2. **Wire up the contact point** — Add the URL as a Webhook contact point in Grafana Alerting and attach it to a notification policy.
3. **Map and ship** — GJSON maps status, alertname, severity, and the summary into your push. The next firing alert buzzes your phone.

## From firing panel to lock screen

Grafana already fires a webhook when an alert rule trips. Pocket Alert turns it into a push you cannot miss.

- **A standard contact point** — Add Pocket Alert as a Webhook contact point in Grafana Alerting. No plugin, no agent, works on Cloud and self-hosted.
- **Map fields with GJSON** — GJSON paths pull alertname, status, and the summary annotation straight out of the Grafana payload into your notification.
- **Severity and status inline** — Show the severity label and firing/resolved status right in the push so a critical alert reads differently from a recovery.
- **A channel per team** — Each application has its own webhook URL, so infra, app, and per-team alerts stay in separate channels.
- **Sub-second delivery** — The firing alert hits your phone in under a second, well before anyone opens the dashboard.
- **Secret webhook URL** — The webhook URL is your application secret over HTTPS. Rotate it whenever you need a fresh endpoint.

## Send Grafana alerts to your phone

### 1. Create a Pocket Alert webhook

On the [Webhooks](https://pocketalert.app/webhooks) page create a webhook whose GJSON `message` template reads the Grafana payload. Grafana sends `status`, a `commonLabels` block, and an `alerts` array, so a good template is:

```
curl -X POST "https://api.pocketalert.app/v1/webhooks" \
  -H "Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Grafana","default_level":"critical","message":"[%status%] %commonLabels.alertname% (%commonLabels.severity%)\n%alerts.0.annotations.summary%","application_id":"qm47b9pzxzxg"}'
```

You get an inbound URL like `https://p4a.me/wh/1234abcd`.

### 2. Add it as a Webhook contact point

In Grafana go to [Alerting → Contact points → Add contact point](https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/), choose the Webhook integration, and paste the receive URL:

```
Integration: Webhook
URL:    https://p4a.me/wh/1234abcd
Method: POST
```

Attach the contact point to a notification policy so matching alerts route to it. Grafana posts its standard JSON; the GJSON paths above pull `status`, `commonLabels.alertname`, `commonLabels.severity`, and `alerts.0.annotations.summary` into the push.

### 3. Fire a test

Use the contact point Test button. A firing alert arrives as `[firing] HighCPU (critical)`; when it clears, `status` flips to `resolved`.

The [webhook settings docs](https://info.pocketalert.app/api/webhooks/settings.html) cover every GJSON path and webhook option.

## FAQ

### How do I send Grafana alerts to my phone?

In Grafana go to Alerting → Contact points, add a Webhook contact point, and paste your Pocket Alert application URL. Attach it to a notification policy and the next firing alert reaches your phone in under a second.

### How does field mapping work?

Grafana posts a JSON payload with status, a commonLabels block, and an alerts array. Pocket Alert reads it with GJSON paths, so you map commonLabels.alertname to the title, alerts.0.annotations.summary to the body, and status to show firing or resolved.

### Can I show severity and status?

Yes. The payload carries the severity label at commonLabels.severity and a status of firing or resolved. Reference both in your GJSON message template so a critical firing alert reads differently from a resolved one.

### Can I split alerts by team?

Give each Grafana folder or team its own application. Infra alerts and app alerts land in separate channels, and you can mute one without touching the other.

### Do I need a plugin?

Nothing extra. Pocket Alert receives the webhook Grafana already sends from its alerting engine, so there is no plugin or agent to install. Works with Grafana Cloud and self-hosted alike.

### Can I map alert severity to notification priority?

Yes. Every message accepts a level — silent, low, default, high, or critical. Include a "level" field in the payload, or set default_level on the webhook so everything routed to it arrives at that priority; an explicit level in the payload wins. A firing=critical, resolved=silent split works well: the firing alert breaks through Do Not Disturb, the recovery stays quiet in history. An invalid value falls back to default, never rejected.
