
Monitor Remote Systems with Uptime Kuma Push Heartbeats
For Uptime Kuma Push monitors. Check the monitor interval and push endpoint behavior in the installed release.
A push monitor lets a system with outbound access report to Uptime Kuma without accepting an inbound probe. Kuma must be reachable from the sender, but it does not have to be publicly reachable if a private network or VPN supplies that path. A heartbeat reports that its sender ran and reached Kuma; it does not automatically prove that an application is healthy.
Create the monitor and protect its endpoint
Create a Push monitor and choose an interval that allows for scheduler jitter. For a task that runs every 60 seconds, allow a practical missed-heartbeat window, for example 180 seconds, and then test the actual down/recovery timing. Configure and test the intended notification channel separately.
The generated push URL contains a bearer-style token. Store it privately and rotate it if exposed. Use valid HTTPS and the proper trust chain; do not use curl -k or another certificate-validation bypass as a normal monitoring setting.
Send a Linux heartbeat without exposing the URL in cron
Create a dedicated local service account and a protected curl configuration. The following example uses a new kuma-push identity; adapt it to the approved account-management process for your Linux distribution:
sudo useradd --system --user-group --home-dir /nonexistent --shell /usr/sbin/nologin kuma-push
sudo install -m 0640 -o root -g kuma-push /dev/null /etc/uptime-kuma-push.conf
sudoedit /etc/uptime-kuma-push.conf
Enter the generated URL privately in curlโs configuration format. This is a placeholder, not a real monitor token:
url = "https://status.example.com/api/push/REPLACE_WITH_TOKEN?status=up&msg=OK"
Add this single line to a root-owned file under /etc/cron.d/, ending the file with a newline:
* * * * * kuma-push /usr/bin/curl --config /etc/uptime-kuma-push.conf --fail --silent --show-error --connect-timeout 10 --max-time 20 --output /dev/null
Test the same command as the service account and verify that Kuma records a new heartbeat. Keep the URL out of shell arguments and public logs. If monitoring a specific service, have a reviewed wrapper perform a real health check before sending an up result; never report up unconditionally when the check fails.
Send a Windows heartbeat from a scheduled task
Store the URL in C:\ProgramData\KumaPush\push-url.txt with ACLs limited to administrators and the task identity. Protect the script directory as well; do not put the script in a normal user-writable location and then run it with higher privileges.
$ErrorActionPreference = 'Stop'
try {
$uri = (Get-Content -LiteralPath 'C:\ProgramData\KumaPush\push-url.txt' -Raw).Trim()
$result = Invoke-RestMethod -Uri $uri -Method Get -TimeoutSec 20
if ($result.ok -ne $true) { throw 'Heartbeat was not accepted.' }
exit 0
}
catch {
Write-Error 'Heartbeat failed; inspect the protected configuration and connectivity.'
exit 1
}
Use Task Scheduler to run the fully qualified script every minute under a suitable low-privilege identity. Set an explicit executable/working directory, prevent overlapping instances and follow the script-signing policy. SYSTEM and ExecutionPolicy Bypass are not prerequisites for an outbound heartbeat.
Test failure, recovery and notification delivery
- Confirm the sender records success and Kuma receives a fresh heartbeat.
- Stop or disable the sender and wait beyond the configured interval/retry window; confirm the monitor becomes down.
- Confirm the actual notification arrives at the intended destination. An accepted push is not proof of delivered notification.
- Restart the sender and confirm recovery. Test any application-specific health check separately.
A Kuma instance hosted on the same machine or failure domain as the monitored system cannot reliably notify during a total shared outage. Use independent monitoring for that requirement.
References
- Uptime Kuma: push endpoint documentation
- curl: configuration file syntax and options
- Microsoft: Invoke-RestMethod
- Microsoft: Task Scheduler