Make HTTP requests to the Ping URL at regular intervals. When the URL is not pinged on time, Unical Healthchecks will send you an alert. You can monitor any service that can make HTTP requests or send emails.
https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10
# m h dom mon dow command
8 6 * * * /home/user/backup.sh && curl -fsS -m 10 --retry 5 -o /dev/null https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10
# using curl (10 second timeout, retry up to 5 times):
curl -m 10 --retry 5 https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10
# using wget (10 second timeout, retry up to 5 times):
wget https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10 -T 10 -t 5 -O /dev/null
# Using Python 3 standard library:
import socket
import urllib.request
try:
urllib.request.urlopen("https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10", timeout=10)
except socket.error as e:
# Log ping failure here...
print("Ping failed: %s" % e)
# Using the requests library:
import requests
try:
requests.get("https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10", timeout=10)
except requests.RequestException as e:
# Log ping failure here...
print("Ping failed: %s" % e)
require 'net/http'
require 'uri'
Net::HTTP.get(URI.parse('https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10'))
var https = require('https');
https.get("https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10");
package main
import "fmt"
import "net/http"
import "time"
func main() {
var client = &http.Client{
Timeout: 10 * time.Second,
}
_, err := client.Head("https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10")
if err != nil {
fmt.Printf("%s", err)
}
}
file_get_contents('https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10');
using (var client = new System.Net.WebClient())
{
client.DownloadString("https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10");
}
// the server returns appropriate CORS headers so cross-domain AJAX requests work:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10', true);
xhr.send(null);
# inside a PowerShell script:
Invoke-RestMethod https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10
# Without an underlying script, passing the command to PowerShell directly:
powershell.exe -command &{Invoke-RestMethod https://healthchecks.unical.it/ping/5da425f9-d385-468a-9345-d64b3b47ed10}
A list of your checks, one for each Cron job, daemon or scheduled task you want to monitor.
Give names and assign tags to your checks to easily recognize them later.
Tap on the integration icons to toggle them on and off.
Adjust Period and Grace time to match the 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", Unical Healthchecks sends you a notification. |
Alternatively, you can define the expected ping dates and times using a cron expression. See Cron Syntax Cheatsheet for the supported syntax features.
Grace Time specifies how "late" a ping can be before you will be alerted. Set it to be a little above the expected duration of your cron job.
You can add a longer, free-form description to each check. Leave notes and pointers for yourself and for your team.
You can also see the log of received pings and sent "Down" notifications.
Unical Healthchecks provides status badges for each of the tags you have used. Additionally, the "Unical Healthchecks" badge shows the overall status of all checks in your account.
The badges have public, but hard-to-guess URLs. You can use them in your READMEs, dashboards or status pages.
Unical Healthchecks monitoring is a great fit for cron jobs and cron-like systems (systemd timers, Jenkins build jobs, Windows Scheduled Tasks, wp-cron, uwsgi cron-like interface, Heroku Scheduler, ...). A failed cron job often has no immediate visible consequences, and can go unnoticed for a long time.
Specific examples:
Unical Healthchecks monitoring can be used for lightweight server monitoring: ensuring a particular system service, or the server as a whole is alive and healthy. Write a shell script that checks for a specific condition, and pings Unical Healthchecks if successful. Run the shell script regularly.
Specific examples: