Skip to main content

A lightweight and configurable system healthcheck tool for Linux

Project description

healthcheck-lite

A lightweight, flexible system healthcheck utility for Linux using a simple INI configuration file.

Features

  • Check systemd services, memory usage, disk usage, TCP ports, file contents, zombie processes, SSL certs, and more.
  • Configurable severity level.
  • INI file structure with support for multiple sections.
  • Supports output in JSON or HTML.
  • Watch mode for continuous monitoring.
  • Test mode for validating configuration files.

Installation

pip install healthcheck-lite

Usage

healthcheck-lite --config mychecks.ini

Available Options

  • --config FILE – Path to the configuration INI file.
  • --exec TYPE1,TYPE2,... – Run only specific check types (e.g. memory,file).
  • --name NAME – Run only the check with the given name.
  • --output results.json|results.html – Save the output to a file.
  • --strict – Mark script as failed on any failed check, regardless of severity.
  • --test – Only validate the INI configuration file, without running checks.
  • --watch N – Run checks every N minutes in a loop.

Example INI

[global]
severity=3
green=\033[92m
red=\033[91m
reset=\033[0m

[service]
name=Check SSH
service=ssh
severity=2

[process]
name=Check Gunicorn
regex=.*gunicorn.*
countmin=1
severity=3

[port]
name=HTTP Port
host=localhost
port=80
severity=3

[filesystem]
name=Root FS
filesystem=/
used=80
severity=3

[memory]
name=Memory usage
used=90
severity=3

[file]
name=Log check
file=/var/log/syslog
regex=.*ERROR.*
severity=3

[establish]
name=MySQL connections
dest=127.0.0.1:3306
used=50
severity=2

[command]
name=Check hostname
command=hostname
expect_regex=.*   # any non-empty output
severity=3

[filecheck]
name=Check /etc/passwd
path=/etc/passwd
must_exist=true
mode=644
owner=root
group=root
severity=2

[ping]
name=Ping Google DNS
host=8.8.8.8
count=2
severity=3

[load]
name=System Load
load1=4.0
severity=3

[sslcheck]
name=Google SSL
host=google.com
port=443
days_warn=7
severity=2

[zombies]
name=Zombie check
max=0
severity=1

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

healthcheck_lite-1.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

healthcheck_lite-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file healthcheck_lite-1.0.0.tar.gz.

File metadata

  • Download URL: healthcheck_lite-1.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.18

File hashes

Hashes for healthcheck_lite-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1d150e14acdaa8aae79712459bc1528f2b8c30d7e791aede6f8a7fe6b67cd8a8
MD5 1a3a80beb35a4d72a6151572d5368ca4
BLAKE2b-256 f2acb3e1b20065feca44d61b85e6fd68ec3831a2960ee78e18a6a5c2385329e4

See more details on using hashes here.

File details

Details for the file healthcheck_lite-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for healthcheck_lite-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f36c54cd284db17657113312de371d2dca24796e1bf2a162d08929189ae884d
MD5 6d9416fa64a36b2ee180d899525805a0
BLAKE2b-256 3b3514f72ad79a4a59fe605839cc502e840dd73923fa22c66b617ef54dc16f76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page