Ping healthchecks.io and send an email alert if the ping fails.
- Pings a configurable healthchecks.io endpoint.
- Sends an email alert if the ping fails.
- Uses TOML configuration file for easy setup.
- Stores SMTP credentials securely using keyring.
- Rotating log file support.
- CLI entry point:
hcheckup
Install python 3.12 or later version.
Install pipx:
pip install pipx
Install keyring:
pipx install keyring
pipx install path\hcheckup-version-py3-none-any.whl
For example:
pipx install path\hcheckup-1.0.0-py3-none-any.whl
Alternatively, install hcheckup from a .tar.gz package file:
pipx install path\hcheckup-version.tar.gz
For example:
pipx install path\hcheckup-1.0.0-.tar.gz
-
Create a config file:
Place a
hcheckup.tomlfile in your user config directory (see platformdirs).
Example (~/.config/hcheckup/hcheckup.tomlon Linux):hc_ping_url = "https://hc-ping.com/your-uuid" mail_from = "your.email@gmail.com" mail_to = "your.email@gmail.com" [smtp] server = "smtp.gmail.com" port = 587 user = "your.email@gmail.com" # Set password: keyring set smtp <user>
-
Set SMTP password in keyring:
keyring set smtp your.email@gmail.com
Run from the command line:
hcheckup- On success, the script pings healthchecks.io and exits.
- On failure, it sends an email alert and logs the error.
Logs are written to your user log directory (see
platformdirs), e.g.,
C:\Users\Username\AppData\Local\CamPing\Logs on Windows.
- Python 3.12+
- keyring
- platformdirs
- requests
GPL-3.0-or-later. See LICENSE.txt.
Keith Gorlen (kgorlen@gmail.com)