Integrations2 min read
Uptime Kuma
Integrate self-hosted Uptime Kuma with OpsKnight.
Uptime Kuma Integration
Receive alerts from Uptime Kuma.
Endpoint
POST /api/integrations/uptime-kuma?integrationId=YOUR_INTEGRATION_ID
Setup
Step 1: Create Integration in OpsKnight
- In OpsKnight, go to Service -> Integrations.
- Add a Uptime Kuma integration.
- Copy the Webhook URL:
https://[YOUR_DOMAIN]/api/integrations/uptime-kuma?integrationId=[ID]
Step 2: Configure Uptime Kuma
- Go to Settings -> Notifications.
- Click Setup Notification.
- Notification Type: Webhook.
- Friendly Name: OpsKnight.
- Post URL: Paste the OpsKnight Webhook URL.
- Content Type:
application/json. - Test and Save.
Payload Format
Uptime Kuma sends:
{
"heartbeat": {
"status": 0,
"msg": "Connection timeout",
"monitorID": 1
},
"monitor": {
"name": "My API",
"url": "https://api.example.com"
}
}
Event Mapping
| Status Code | Meaning | OpsKnight Action |
|---|---|---|
1 |
Up | Resolve incident |
0 |
Down | Trigger incident |
Deduplication
Dedup key is generated from uptime-kuma-{monitorID}.
Testing
Using Uptime Kuma UI
- Go to Settings -> Notifications
- Click Test on your defined notification
Using cURL
curl -X POST "https://YOUR_OPSKNIGHT_URL/api/integrations/uptime-kuma?integrationId=YOUR_ID" \
-H "Content-Type: application/json" \
-d '{
"heartbeat": { "status": 0, "msg": "Test Down", "monitorID": 99 },
"monitor": { "name": "Test Monitor" }
}'
Status Logic
OpsKnight translates status codes:
| Status Code | Meaning | Action |
|---|---|---|
1 |
UP | Resolve |
0 (or others) |
DOWN | Trigger (Critical) |
This supports both numeric status codes and string values like "Up" or "Resolved".
Last updated for v1
Edit this page on GitHub