Appearance
Integrations
An integration is where alerts come in. Each one has its own address and key, and decides who gets alerted.
Creating an integration
- Go to Integrations and click New integration.
- Choose what will send alerts (the source). The options are below.
- Give it a name, and optionally a description.
- Under Who gets alerted, add the rotations whose on-call person should be paged, and any contact points to notify as well.
- Save. The integration's page then shows numbered setup steps for that tool, the address to send to, and its key.
Sources
| Source | What it's for |
|---|---|
| Prometheus | Alertmanager webhooks. Also Mimir, Thanos and VictoriaMetrics. |
| Grafana | Grafana Alerting contact points. |
| Datadog | Monitors, through Datadog's Webhooks integration. |
| Sentry | Issue alerts, metric alerts and issue webhooks. |
| UptimeRobot | Down and up alerts from your monitors. |
| Amazon CloudWatch | CloudWatch alarms through an SNS topic. |
| PagerDuty-compatible | Any tool that can send to PagerDuty, pointed at Rotadeck. |
| Opsgenie-compatible | Any tool that can send to Opsgenie, pointed at Rotadeck. |
| Generic webhook | Anything that can send JSON. |
Every source resolves its own alerts: when the tool says the problem is fixed, the alert closes in Rotadeck. Repeats of an alert that's still open don't create new ones.
The event address
Most sources send to the integration's event URL, shown on its page:
https://api.rotadeck.com/api/v1/integration/{integration_key}/eventTreat the key like a password: anyone with it can create alerts. To change it, delete the integration and create a new one.
Prometheus
Add a webhook receiver to Alertmanager and keep send_resolved on, so recoveries close the alert:
yaml
receivers:
- name: rotadeck
webhook_configs:
- url: "https://api.rotadeck.com/api/v1/integration/{integration_key}/event"
send_resolved: true
route:
receiver: rotadeckEach alert in a notification becomes its own Rotadeck alert, matched on its fingerprint. The title is the alertname with its summary annotation.
Grafana
- In Grafana, go to Alerting → Contact points → Add contact point.
- Choose Webhook, paste the event URL, and leave the method as POST.
- Use the contact point in a notification policy. Resolved alerts close in Rotadeck automatically.
Datadog
- In Datadog, open Integrations → Webhooks and add a webhook named
rotadeck. - Use the event URL as the URL, and this as the custom payload:
json
{
"alert_cycle_key": "$ALERT_CYCLE_KEY",
"alert_id": "$ALERT_ID",
"transition": "$ALERT_TRANSITION",
"title": "$EVENT_TITLE",
"body": "$EVENT_MSG",
"scope": "$ALERT_SCOPE",
"link": "$LINK"
}- Add
@webhook-rotadeckto the message of each monitor that should page. Recoveries close the alert.
Sentry
- In Sentry, go to Settings → Developer Settings → Custom Integrations → Create New Integration → Internal Integration.
- Use the event URL as the webhook URL, turn on Alert Rule Action, and subscribe to Issue webhooks.
- Add "Send a notification via" this integration to the alert rules that should page.
Resolving or ignoring the issue in Sentry closes the alert.
UptimeRobot
- In UptimeRobot, add a Webhook alert contact with the event URL as the URL to notify.
- Turn on Send as JSON and use this as the POST value:
json
{
"monitorID": "*monitorID*",
"monitorURL": "*monitorURL*",
"monitorFriendlyName": "*monitorFriendlyName*",
"alertType": "*alertType*",
"alertTypeFriendlyName": "*alertTypeFriendlyName*",
"alertDetails": "*alertDetails*"
}- Attach the alert contact to your monitors. When a monitor comes back up, the alert closes.
Amazon CloudWatch
- Create an SNS topic, or use an existing one.
- Add an HTTPS subscription with the event URL as the endpoint. Rotadeck confirms the subscription automatically.
- Point your alarms' ALARM and OK actions at the topic, so recoveries close the alert.
Generic webhook
Send a POST with a JSON body to the event URL. Common field names are recognised:
| Meaning | Fields looked for |
|---|---|
| Title | title, summary, subject, name, alertname |
| Description | description, details, body, message, text |
| Alert id (to match a recovery) | dedup_key, incident_key, alert_id, fingerprint, id, key |
| Status | status, state, event_type, action, event |
A status of resolved, ok, recovered, closed, up, normal or cleared closes the alert with the same id. acknowledged or ack acknowledges it.
bash
curl -X POST "https://api.rotadeck.com/api/v1/integration/{integration_key}/event" \
-H "Content-Type: application/json" \
-d '{"id": "disk-db-2", "title": "Disk at 90%", "status": "firing"}'
# Later, close it:
curl -X POST "https://api.rotadeck.com/api/v1/integration/{integration_key}/event" \
-H "Content-Type: application/json" \
-d '{"id": "disk-db-2", "status": "resolved"}'Field mapping
If your tool uses other names, open the integration and fill in Field mapping with dotted paths into your JSON, such as alert.name or alerts.0.status. You can also list which status values close or acknowledge an alert.
The Rotadeck format
The original format still works, with an optional deduplication_key:
json
{"deduplication_key": "disk-db-2", "payload": {"title": "Disk at 90%", "description": "db-2"}}Sending {"deduplication_key": "disk-db-2", "payload": {"state": "closed"}} updates that alert.
If an event can't be read
If an event doesn't match what the source expects, no alert is created, and you get a notification saying what was wrong.
Deleting an integration
WARNING
Deleting an integration stops all alerts from that source, and its event address stops working straight away.
- In the integration list, tick the box next to the integration.
- Click Delete in the bar at the bottom, then confirm.