Skip to content

Integrations ​

An integration is where alerts come in. Each one has its own address and key, and decides who gets alerted.

Creating an integration ​

  1. Go to Integrations and click New integration.
  2. Choose what will send alerts (the source). The options are below.
  3. Give it a name, and optionally a description.
  4. Under Who gets alerted, add the rotations whose on-call person should be paged, and any contact points to notify as well.
  5. Save. The integration's page then shows numbered setup steps for that tool, the address to send to, and its key.

Sources ​

SourceWhat it's for
PrometheusAlertmanager webhooks. Also Mimir, Thanos and VictoriaMetrics.
GrafanaGrafana Alerting contact points.
DatadogMonitors, through Datadog's Webhooks integration.
SentryIssue alerts, metric alerts and issue webhooks.
UptimeRobotDown and up alerts from your monitors.
Amazon CloudWatchCloudWatch alarms through an SNS topic.
PagerDuty-compatibleAny tool that can send to PagerDuty, pointed at Rotadeck.
Opsgenie-compatibleAny tool that can send to Opsgenie, pointed at Rotadeck.
Generic webhookAnything 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}/event

Treat 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: rotadeck

Each alert in a notification becomes its own Rotadeck alert, matched on its fingerprint. The title is the alertname with its summary annotation.

Grafana ​

  1. In Grafana, go to Alerting → Contact points → Add contact point.
  2. Choose Webhook, paste the event URL, and leave the method as POST.
  3. Use the contact point in a notification policy. Resolved alerts close in Rotadeck automatically.

Datadog ​

  1. In Datadog, open Integrations → Webhooks and add a webhook named rotadeck.
  2. 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"
}
  1. Add @webhook-rotadeck to the message of each monitor that should page. Recoveries close the alert.

Sentry ​

  1. In Sentry, go to Settings → Developer Settings → Custom Integrations → Create New Integration → Internal Integration.
  2. Use the event URL as the webhook URL, turn on Alert Rule Action, and subscribe to Issue webhooks.
  3. 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 ​

  1. In UptimeRobot, add a Webhook alert contact with the event URL as the URL to notify.
  2. 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*"
}
  1. Attach the alert contact to your monitors. When a monitor comes back up, the alert closes.

Amazon CloudWatch ​

  1. Create an SNS topic, or use an existing one.
  2. Add an HTTPS subscription with the event URL as the endpoint. Rotadeck confirms the subscription automatically.
  3. 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:

MeaningFields looked for
Titletitle, summary, subject, name, alertname
Descriptiondescription, details, body, message, text
Alert id (to match a recovery)dedup_key, incident_key, alert_id, fingerprint, id, key
Statusstatus, 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.

  1. In the integration list, tick the box next to the integration.
  2. Click Delete in the bar at the bottom, then confirm.