DumbMonit 监控的内容
The silent failure nobody notices: the nightly backup that stopped running after an update, the certificate renewal cron that lost its permissions, the Home Assistant automation that broke on a rename. Nothing complains, and you find out the day you need the backup. A heartbeat monitor (also called a *dead man's switch*, or a *push* monitor in Uptime Kuma) turns the logic around: DumbMonit contacts nothing. The job calls a secret URL each time it runs, and it is the absence of a call that raises the alert.
典型用途. Cron job, backup script, automation that must call in
示例
- Nightly backup script
- Cron job
- Home Assistant automation
- Certificate renewal
- Database dump
连接方式
无需账户。
需要开放的网络端口
8080/TCPHeartbeat call (default port, 443 behind a proxy)
设置步骤: Make the job call in
In the address, write a short label for the job, unique among your heartbeats: "nightly-backup".
Set the expected interval to the job's schedule ("24h" for a nightly job), or give a cron expression and a time zone, then save the monitor.
Copy the URL shown on the monitor page and call it at the end of the job.
curl -fsS -m 10 --retry 3 https://monit.example.com/api/push/<token>To time the job, call .../start before it, then .../success or .../fail after it, with its output as the request body. Send an exit code as ?exit_code=2 or as .../2.
To report a failure at once, append ?status=down&msg=... to the URL.
注意. Call the URL at the end of the job, after the part that matters: a call at the top would report a success even when the job fails.