louislam/uptime-kuma:2), SQLite databaseweb/opt/stack/uptime-kuma/websecure, certresolver le, middleware secure-headersmem_limit: 512mKuma sits on the same server as the apps it watches: if the whole server goes down, Kuma goes down with it. The outside check is Better Stack (free plan, 3 min, email): monitor on https://incenta.enclari.com/api/health.
name: uptime-kuma
services:
uptime-kuma:
image: louislam/uptime-kuma:2
container_name: uptime-kuma
restart: unless-stopped
volumes:
- data:/app/data
networks:
- web
mem_limit: 512m
labels:
- traefik.enable=true
- traefik.docker.network=web
- traefik.http.routers.uptime.rule=Host(`uptime.enclari.com`)
- traefik.http.routers.uptime.entrypoints=websecure
- traefik.http.routers.uptime.tls=true
- traefik.http.routers.uptime.tls.certresolver=le
- traefik.http.routers.uptime.middlewares=secure-headers
- traefik.http.services.uptime.loadbalancer.server.port=3001
volumes:
data:
networks:
web:
external: true
| Name | Type | Notes |
|---|---|---|
| Resend (API) | Own Resend API key uptime-kuma (sending access, domain mail.enclari.com); from Uptime Kuma <alerts@mail.enclari.com> |
|
| Telegram | Telegram bot | Bot created with @BotFather; chat ID from "Auto Get" |
Both are Default enabled (every new monitor gets them). TLS certificate expiry and domain expiry alerts are on (Settings -> Notifications).
| Monitor | Type | Target | Interval |
|---|---|---|---|
| Incenta | HTTP(s) - Keyword | https://incenta.enclari.com/api/health, keyword "queue":"ok" |
60 s, 2 retries, certificate expiry on |
| Backup Incenta (pg_dump) | Push | cron line of the 3:40 pg_dump | 90000 s (25 h) |
A push monitor turns the direction around: the job calls Kuma when it succeeded, and Kuma alerts when the call does not come within the interval ("heartbeat", "dead man's switch"). The token in the push URL is a secret: whoever knows it can report success.
Recipe for any cron job:
90000, monthly: ~2800000), retries 0. Copy the push URL.&&, so it runs only on success. Strip the query (?status=up&msg=OK&ping=): Kuma takes up without it, and & breaks sed replacements.read -rp 'Push URL: ' URL; URL="${URL%%\?*}"
crontab -l > /root/crontab.bak
crontab -l | sed "/<unique part of the cron line>/ s|\$| \&\& curl -fsS -m 10 --retry 3 $URL > /dev/null|" | crontab -
crontab -l | grep -n "<unique part>" | sed 's|push/[^ ]*|push/[TOKEN]|'
curl -fsS -m 10 "$URL"; echo # {"ok":true}, monitor turns green
Candidates not wired yet: Twenty pg_dump (3:30), monthly backup.sh backup all.
Tag: service=uptime-kuma (auto-discovered by backup.sh: /opt/stack/uptime-kuma + volume uptime-kuma_data with the SQLite database).
cd /opt/stack/uptime-kuma
docker compose pull && docker compose up -d # update
docker compose logs -f --tail=100 # logs