Email heartbeat example
Ping a heartbeat monitor by email when the monitored system cannot make outbound HTTPS requests but can still send mail.
Every heartbeat monitor answers to two addresses: an Integration URL for HTTP pings and an Integration email. Mail sent to that address counts as a ping, so a system behind a firewall that blocks outbound HTTPS can still report that it is alive, as long as it can reach an SMTP relay.
The subject and body are ignored — only delivery to the address matters.
Find the address
Go to Alerting → Heartbeat monitors and click the monitor's row. The panel that opens shows Integration email beneath Integration URL. It ends in ilertnotify.com and is unique to that monitor; anyone who has it can keep the monitor green, so treat it like the integration key it contains.
Substitute it for YOUR_INTEGRATION_EMAIL in the examples below.
Send a heartbeat email
echo "heartbeat ok" | mail -s "ilert heartbeat" YOUR_INTEGRATION_EMAILsendmail reads the recipient from the message itself, so the headers have to be there:
printf 'To: YOUR_INTEGRATION_EMAIL\nSubject: ilert heartbeat\n\nheartbeat ok\n' | sendmail -tWhere no mail tools are installed, curl can speak SMTP directly:
curl --url "smtp://your.smtp.server:25" \
--mail-from "heartbeat@yourdomain.example" \
--mail-rcpt "YOUR_INTEGRATION_EMAIL" \
--upload-file - <<'EOF'
Subject: ilert heartbeat
heartbeat ok
EOFTo ping only after a job has succeeded, chain it the same way as an HTTP ping:
run_backup.sh && echo "backup ok" | mail -s "ilert heartbeat" YOUR_INTEGRATION_EMAILVerify it worked
Open the monitor's details panel. After the first email lands, Status turns Healthy and Last ping received shows the delivery time.
Email pings are slower and less certain than HTTP ones — they pass through your relay, greylisting, and queueing before ilert sees them. Set the monitor's interval with enough margin to absorb that delay, and reach for HTTP pings wherever outbound HTTPS is available.
Last updated
Was this helpful?