Make a HTTP GET request to this address from your cron job, daemon, script or long running task. When this address is not requested for a set time period, you will get alerted. Below are snippets that are ready to be copy/pasted into your own scripts.
# m h dom mon dow command
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6 > /dev/null
# using curl:
# (make sure it is installed on your system!)
curl --retry 3 https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6
# using wget:
wget https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6 -O /dev/null
# using urllib2:
import urllib2
urllib2.urlopen("https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6")
# using requests:
import requests
requests.get("https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6")
var https = require('https');
https.get("https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6");
file_get_contents('https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6');
// the server returns appropriate CORS headers so cross-domain AJAX requests should work:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6', true);
xhr.send(null);
Invoke-RestMethod https://healthchecks.it.wm.edu/ping/aeee5040-0905-451e-ae04-d4519cc73bc6
As an alternative to HTTP/HTTPS requests, you can "ping" this check by sending an email message to aeee5040-0905-451e-ae04-d4519cc73bc6@localhost
A list of your checks, one for each Cron job, daemon or periodically running task you want to monitor.
Give names to your checks to easily recognize them later. Adjust Period and Grace time to match periodicity and duration of your tasks.
New. A check that has been created, but has not received any pings yet. | |
Up. Time since last ping has not exceeded Period. | |
Late. Time since last ping has exceeded Period, but has not yet exceeded Period + Grace. | |
Down. Time since last ping has exceeded Period + Grace. When check goes from "Late" to "Down", HealthChecks sends you a notification. |