How to setup push monitoring to uptime kuma instance#

Open the shell using the web interface#

  1. Open the cronjobs
1
crontab -e
  1. Add the following cronjob
1
*   *   *   *   *   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

1
   *   *   *   *   *   

This sets the command to run every minutes

1
systemctl is-active --quiet pveproxy

Checks if the web interface/api is running

1
&& 

If the first half of the command does not return true then it will not run the second half

1
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

1
> /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