Skip to content

Repository files navigation

HCheckUp

Ping healthchecks.io and send an email alert if the ping fails.

Features

  • 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

Prerequisites

Install python 3.12 or later version.

Install pipx:

pip install pipx

Install keyring:

pipx install keyring

Install hcheckup FROM .whl package

pipx install path\hcheckup-version-py3-none-any.whl

For example:

pipx install path\hcheckup-1.0.0-py3-none-any.whl

Install hcheckup FROM .tar.gz package

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

Configuration

  1. Create a config file:

    Place a hcheckup.toml file in your user config directory (see platformdirs).
    Example (~/.config/hcheckup/hcheckup.toml on 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>
  2. Set SMTP password in keyring:

    keyring set smtp your.email@gmail.com

Usage

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.

Logging

Logs are written to your user log directory (see platformdirs), e.g., C:\Users\Username\AppData\Local\CamPing\Logs on Windows.

Requirements

License

GPL-3.0-or-later. See LICENSE.txt.

Author

Keith Gorlen (kgorlen@gmail.com)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages