Proxmox 9 uptime kuma push monitor setup
How to setup push monitoring to uptime kuma instance
Open the shell using the web interface
- Open the cronjobs
crontab -e
- Add the following cronjob
* * * * * systemctl is-active \
--quiet pveproxy && curl -fsS -m 10 \
--retry 5 https://<URL>/api/push/<API_KEY>?status=up&msg=OK&ping= \
> /dev/null
Unlike a regular uptime kuma push monitor, this checks if the web interface is running to check if the system is both online and accessible 3. Command breakdown
* * * * *
This sets the command to run every minutes
systemctl is-active --quiet pveproxy
Checks if the web interface/api is running
&&
If the first half of the command does not return true then it will not run the second half
curl -fsS -m 10 --retry 5 \
https://<URL>/api/push/<API_KEY>?status=up&msg=OK&ping=
Pushes the alert to the monitor with the following attributes: - -f (fail): fails silently without any output on HTTP errors - -s (silent): doesn’t show progress or error messages - -S (show-error): when used with -s it will re-enable error messages if the command fails - -m 10 (max time): This forces the command to abort if it takes longer than 10 seconds - –retry 5 (max attempts): This will set the number of times for the command to be attempted
> /dev/null
Redirects the output to null to prevent noisy logs
Once this is saved you should see the monitor in uptime kuma start reciving the heartbeats