Grafana
Each Grafana alert arrives as a message when it fires, at a priority taken from its severity label, with buttons to open it in Grafana and to silence it. When the alert resolves, its message is replaced by a "Resolved:" one, so the topic shows what is wrong now.
Setting it up#
In the app these steps are under Connect a system → Grafana, or a topic's Send to this topic tab, with the address, topic and a token filled in; New token makes the token.
A webhook contact point. A resolved alert replaces the message it fired with.
Alerts & IRM → Alerting → Notification configuration → Contact points → + Add contact point. Name it, and pick the integration Webhook.
- URL:
https://notify.example.com/grafana?template=grafana
- URL:
Under Optional Webhook settings:
- HTTP Method: POST
- Authorization Header - Scheme:
Bearer - Authorization Header - Credentials:
tk_replace_with_your_token
Test, then Save contact point, and choose it in a notification policy.
The steps here show example values (https://notify.example.com, the topic grafana, tk_replace_with_your_token): copy them from the app, where yours are filled in.
- The contact point only gets the alerts that a notification policy sends to it. Choosing it as the default policy's contact point sends it every alert.
- Grafana groups alerts before it sends them: alerts of one group arrive as one message ("HostDown · 3 alerts"), and that message is replaced as the group changes. Grafana's default policy waits 30 seconds before it sends a new group.
- Skirl's tests run these steps against Grafana 13.3.2.
Events#
| Event | On at first | What it means |
|---|---|---|
| Alert firing | Yes | An alert (or a group of alerts) fires. The priority comes from the severity label: critical, page or emergency 5; warning or warn 3; info, low or none 2; any other, or none, 4. |
| Alert resolved | Yes | The alert resolves. Its message replaces the firing one, titled "Resolved: …", at priority 2. |
Untick Alert resolved to keep the firing message as it was; untick Alert firing to be told only when things recover.
What a message looks like#
An alert rule firing for one server, as Grafana 13.3.2 sent it:
High CPU · pve-01
CPU above 90% for 10 minutes
pve-01 has been above 90% CPU.
[ var='B' labels={instance=pve-01} type='reduce' value=2 ], [ var='C' labels={instance=pve-01} type='threshold' value=1 ]Priority 5 · Tags: rotating_light, critical · Buttons: Open in Grafana, Silence
The title is the alert's name and its instance label; the text is its summary, its description and Grafana's values. Tapping the message opens the alert's panel (or its dashboard, or the alert itself). rotating_light shows as 🚨.
When it resolves, the same message becomes:
Resolved: High CPU · pve-01
CPU above 90% for 10 minutes
pve-01 has been above 90% CPU.
[ var='B' labels={instance=pve-01} type='reduce' value=1 ], [ var='C' labels={instance=pve-01} type='threshold' value=0 ]Priority 2 · Tags: white_check_mark, critical · Button: Open in Grafana
A group lists up to eight alerts, one a line (• firing, ✓ resolved), and then how many more, such as "…and 2 more".
When nothing arrives#
- Press Test on the contact point. Grafana says whether the test was delivered. In Skirl it arrives as "TestAlert · Grafana" with the text "Notification test", at priority 4.
- Grafana reports 401 or 403. The credentials are not the token, or the token was rotated or revoked (401), or it is a token for another topic (403). Make a new token on the topic's Send to this topic tab and paste it into Authorization Header - Credentials.
- The test works but alerts do not. No notification policy sends the alerts to this contact point, or the policy is still waiting to send the group.
- Resolved alerts do not arrive. Alert resolved is unticked, so the address in the contact point ends with
&events=firing. - Grafana cannot reach Skirl. Grafana Cloud, or a Grafana on another network, cannot reach an address that only works at home: A sender gets no message through.