Grafana alert push notifications
PushPiper sends Grafana alerts to your phone, free for 10,000 messages a month. You use Grafana's built-in Webhook contact point with a Custom Payload (Grafana 12.0 or later) that speaks PushPiper's Pushover-compatible API.
Before you start
Grab two keys from PushPiper. Sign in at pushpiper.com/app (free, no credit card), create an app called Grafana for its API token (APP_TOKEN), and copy your user key (USER_KEY) from the dashboard.
Create the webhook contact point
- Go to Alerts & IRM > Alerting > Notification configuration and open Contact points.
- Click + Add contact point, name it PushPiper and pick Webhook as the integration.
- URL:
https://api.pushpiper.com/1/messages.json, with HTTP Method left on POST. - In the optional settings, open Custom Payload and paste the template below into Payload Template.
- Add two Payload Variables:
tokenset to your APP_TOKEN anduserset to your USER_KEY. - Click Test, then Save contact point, and route alerts to it from a notification policy.
{{- $priority := "0" -}}
{{- if eq .Status "firing" }}{{ $priority = "1" }}{{ end -}}
{{ coll.Dict
"token" .Vars.token
"user" .Vars.user
"title" (tmpl.Exec "default.title" .)
"message" (tmpl.Exec "default.message" . | reReplaceAll "(?s)^(.{1000}).+$" "$1")
"priority" $priority
"url" .ExternalURL
"url_title" "Open Grafana"
| data.ToJSON }}Grafana sends the result as JSON with Content-Type: application/json, which PushPiper reads as is. We ran this template through Grafana's own alerting code: firing alerts come out at priority 1, resolved ones at 0, and a group of 30 alerts still makes a valid message.
What the template sends
| PushPiper field | From Grafana | Notes |
|---|---|---|
title | default.title | Status, alert count and labels |
message | default.message | Cut to 1,000 characters, under the 1,024 limit |
priority | .Status | 1 when firing, 0 when resolved |
url, url_title | .ExternalURL | A link that opens your Grafana |
token, user | .Vars | Your keys, from Payload Variables |
Want a sound? Add "sound" "siren" to the coll.Dict list. Want quiet recoveries? Change the starting "0" to "-1". Every field is in the API reference.
No Custom Payload? Use email
Custom Payload arrived in Grafana 12.0 and isn't generally available in Grafana Cloud yet. On those setups, add an Email contact point and send it to your personal PushPiper address, <id>@pushpiper.app. The subject becomes the title and the text becomes the message.
Self-hosted Grafana needs a working [smtp] section to send mail. Mail can't trigger emergency priority; priority and sound come from the alias settings in PushPiper.
Limits and caveats
- The Pushover integration is out. It's hardwired to
api.pushover.net. - Payload Variables aren't secret. Unlike the password fields, Grafana stores them in plain text, so anyone who can edit contact points can read the token. Give Grafana its own PushPiper app.
- Version. Custom Payload needs Grafana 12.0 or later and isn't generally available in Grafana Cloud yet.
- No screenshots. Alert images aren't attached.
- Big groups get trimmed. Long alert groups are cut at 1,000 characters. Group by more labels, or set Max Alerts, to keep messages readable.
Sources
Questions and answers
Can I use Grafana's Pushover contact point with PushPiper?
No. The Pushover integration always posts to api.pushover.net and has no URL field. Use the Webhook contact point with the Custom Payload on this page, or the email fallback.
Which Grafana version do I need?
Grafana 12.0 or later for Custom Payload. On older versions, or on Grafana Cloud where Custom Payload isn't generally available yet, point an Email contact point at your PushPiper address.
Why cut the message at 1,000 characters?
PushPiper takes messages up to 1,024 characters, and Grafana's default message lists every alert in the group with its labels and links. The template trims it so big groups still arrive.
Can resolved alerts arrive quietly?
Yes. Change the starting priority in the template from 0 to -1 and resolved alerts arrive as quiet notifications. Or turn on Disable resolved message to skip them.