Know when a host goes dark
You’ll get: an incident when a server, NAS or Raspberry Pi stops checking in — whether it crashed, lost power, or lost the network — instead of you finding out when you next try to use it.
Before you start
Section titled “Before you start”Create a heartbeat monitor for the host (see Heartbeat monitors) and set its expected interval and grace period to match how often you’ll ping it — for example, an interval of 5 minutes with a couple of minutes’ grace, so one missed network blip doesn’t open an incident. Copy the monitor’s key, shaped like iik_hb_….
1. Ping it on a schedule
Section titled “1. Ping it on a schedule”From cron, on the host you want watched:
*/5 * * * * curl -fsS -m 10 --retry 3 https://infrainbox.example.com/v1/heartbeats/iik_hb_XXXXXXXXXXXX >/dev/null 2>&1Or, without cron, a systemd timer:
[Unit]Description=Ping InfraInbox heartbeat
[Service]Type=oneshotExecStart=/usr/bin/curl -fsS -m 10 --retry 3 https://infrainbox.example.com/v1/heartbeats/iik_hb_XXXXXXXXXXXX[Unit]Description=Ping InfraInbox every 5 minutes
[Timer]OnBootSec=2minOnUnitActiveSec=5min
[Install]WantedBy=timers.targetsudo systemctl enable --now infrainbox-heartbeat.timerA plain ping like this is always a success: it doesn’t matter which form you use, as long as it arrives before the interval and grace period run out.
Check it works
Section titled “Check it works”- The monitor shows Up in the dashboard within a few minutes of setting this up.
- Stop the timer (or unplug the host, if you’re brave): once the interval plus grace period elapses with no ping, the monitor flips to Down and an incident opens.
- Bring it back: the next ping resolves the incident automatically.