Uptime Monitoring
Route uptime alerts from Uptime Kuma, Healthchecks.io, or custom monitors to any channel.
Uptime monitors check whether your services are online and fire alerts when something goes down. Instead of configuring each monitor to notify each channel individually, point them all at Alphorn and let routing rules handle the rest.
With Uptime Kuma
Uptime Kuma is a popular self-hosted monitoring tool. It supports webhook notifications out of the box.
Simple setup
The quickest way — just point Uptime Kuma at your Alphorn webhook. Alphorn will receive the raw payload and forward it to your channels.
- Create a webhook in Alphorn and copy the URL
- In Uptime Kuma, go to Settings → Notifications
- Add a new notification with type Webhook
- Paste your Alphorn webhook URL as the URL
- Done — Uptime Kuma sends its default payload and Alphorn routes it
This works out of the box. You'll get notifications with Uptime Kuma's default message format.
Advanced setup
For richer notifications with priority-based routing and custom tags, configure a custom request body:
- In the Uptime Kuma notification settings, set Body to Custom Body
- Use this JSON template:
{
"title": "{{ monitorJSON['name'] }} is {{ heartbeatJSON['status'] === 1 ? 'UP' : 'DOWN' }}",
"message": "{{ monitorJSON['url'] }} — {{ heartbeatJSON['msg'] }}",
"priority": {{ heartbeatJSON['status'] === 1 ? 2 : 5 }},
"tags": ["uptime", "{{ heartbeatJSON['status'] === 1 ? 'recovery' : 'down' }}"]
}This gives you:
- Dynamic priority — DOWN events get priority 5 (critical), UP recoveries get priority 2 (low)
- Tags —
downorrecoverytags for filtering - Readable titles — "My API is DOWN" instead of a raw JSON blob
Routing examples
With the advanced setup you can route based on priority and tags:
| Channel | Filter | Purpose |
|---|---|---|
| PagerDuty | priority >= 4 | Page on-call for outages |
| Slack (#incidents) | tags CONTAINS "down" | Team visibility when services go down |
| Slack (#incidents) | tags CONTAINS "recovery" | Notify when services recover |
| No filter | Full audit trail |
With Healthchecks.io
Healthchecks.io monitors cron jobs and heartbeats. Configure a webhook integration pointing to your Alphorn endpoint.
Custom uptime check
A simple bash script that checks a URL and sends the result to Alphorn:
#!/bin/bash
URL="https://your-app.com/health"
WEBHOOK="https://app.alphorn.dev/api/webhooks/wh_abc123"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
if [ "$STATUS" -ne 200 ]; then
curl -s -X POST "$WEBHOOK" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"Health check failed\",
\"message\": \"$URL returned HTTP $STATUS\",
\"priority\": 5,
\"tags\": [\"uptime\", \"down\"]
}"
fiRun this with cron every minute:
* * * * * /path/to/healthcheck.sh