INFRA Signal 412
Systemd services ping healthchecks.io on success and failure via OnSuccess/OnFailure hooks
Illustration only Photo by Markus Spiske on Unsplash
A systemd template service uses OnSuccess/OnFailure hooks to curl a self-hosted healthchecks.io instance, with an updated version supporting start and logging options.
Engineers can monitor systemd-triggered jobs without extra agents, using built-in hooks. The updated template passes $MONITOR_* variables to include logs and exit codes, but only works when a single service triggers the handler.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
OnSuccess/OnFailure hooks trigger curl pings to healthchecks.io for service status changes.
The updated template uses a single service file with :failure:success:start arguments to differentiate actions.
$MONITOR_* environment variables are only passed when a single service triggers the handler, not when multiple do.
THE CLUSTER