No description
|
|
||
|---|---|---|
| systemd | ||
| healthcheck.py | ||
| install_systemd.fish | ||
| install_systemd.sh | ||
| README.md | ||
| setup.fish | ||
| setup.sh | ||
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 your user systemd directory:
mkdir -p ~/.config/systemd/user cp systemd/chamado-health.service ~/.config/systemd/user/ cp systemd/chamado-health.timer ~/.config/systemd/user/ -
Update the
HEALTHCHECK_URLin the service unit or set it in~/.config/chamado-health. -
Reload the user daemon and enable the timer:
systemctl --user daemon-reload systemctl --user enable --now chamado-health.timer systemctl --user status chamado-health.timer -
If you change the service or timer unit later, reload the user daemon and restart the timer using the unit name (not the file path):
systemctl --user daemon-reload systemctl --user restart --now chamado-health.timer systemctl --user list-timers --all | grep chamado-health journalctl --user -u chamado-health.service -n 10 --no-pager
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.