No description
Find a file
Ronaldo Dias bc5c03118f Adiciona linting config e body JSON no ping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 03:01:14 -03:00
systemd refactor: renomear aplicação de chamado-health para health-monitor 2026-06-06 20:17:46 -03:00
.gitignore Criação do .gitignore 2026-06-06 10:09:37 -03:00
.shellcheckrc Adiciona linting config e body JSON no ping 2026-06-07 03:01:14 -03:00
healthcheck.py Adiciona linting config e body JSON no ping 2026-06-07 03:01:14 -03:00
install_systemd.fish refactor: renomear aplicação de chamado-health para health-monitor 2026-06-06 20:17:46 -03:00
install_systemd.sh refactor: renomear aplicação de chamado-health para health-monitor 2026-06-06 20:17:46 -03:00
pyproject.toml Adiciona linting config e body JSON no ping 2026-06-07 03:01:14 -03:00
README.md Update README for user systemd units and fix timer config to minutely 2026-06-05 14:28:12 -03:00
setup.fish refactor: renomear aplicação de chamado-health para health-monitor 2026-06-06 20:17:46 -03:00
setup.sh refactor: renomear aplicação de chamado-health para health-monitor 2026-06-06 20:17:46 -03:00

Chamado Health

Simple health check script for Healthchecks.io, designed to run every minute using a systemd timer.

Installation

  1. 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/
    
  2. Update the HEALTHCHECK_URL in the service unit or set it in ~/.config/chamado-health.

  3. 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
    
  4. 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_URL must 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 0 when the request succeeds with 2xx.
  • Logs diagnostic errors to journal if the request fails.