1 KiB
1 KiB
Chamado Health
Simple health check script for Healthchecks.io, designed to run every minute using a systemd timer.
Installation
-
Copy the systemd unit files to
/etc/systemd/system/:sudo cp systemd/chamado-health.service /etc/systemd/system/ sudo cp systemd/chamado-health.timer /etc/systemd/system/ -
Update the
HEALTHCHECK_URLin the service unit or set it in/etc/default/chamado-health. -
Reload systemd and enable the timer:
sudo systemctl daemon-reload sudo systemctl enable --now chamado-health.timer sudo systemctl status chamado-health.timer
Configuration
-
HEALTHCHECK_URLmust be set to your Healthchecks.io ping endpoint. -
You can also pass the URL as a command-line argument to the script:
./healthcheck.py https://hc-ping.com/<your-uuid>
Script behavior
- Sends an HTTP GET to the configured Healthchecks.io URL.
- Exits with code
0when the request succeeds with2xx. - Logs diagnostic errors to journal if the request fails.