Skip to main content

A CLI for monitoring server and Docker container health

Project description

Infrahealth CLI

A command-line tool for monitoring server and Docker container health, including CPU, memory, disk, network, and application metrics, with support for Prometheus export and alerting.

Features

  • Monitor server health (check server): CPU, memory, disk, network, uptime, processes, and load averages.
  • Monitor Docker containers (check docker): CPU, memory, network, and restart counts.
  • Alerting: Send email notifications for high resource usage.
  • Prometheus integration: Export metrics for visualization.
  • Output formats: Text or JSON.

Installation

pip install git+https://github.com/<your-username>/infrahealth.git

Usage

# Check server health
infrahealth check server
infrahealth check server --detailed --format json

# Check Docker container health
infrahealth check docker
infrahealth check docker --detailed --alert

# Start Prometheus exporter
infrahealth start-prometheus --port 8000

Requirements

Python 3.6+

Libraries: click, psutil, docker, requests, prometheus_client

Optional: Docker for container monitoring, Prometheus

Setup

# Clone the repository
git clone https://github.com/<your-username>/infrahealth.git
cd infrahealth

# Install dependencies
pip install -e .

# Run tests
pytest

Development

Contributions are welcome! To contribute:

# Fork the repository

# Create a feature branch
git checkout -b feature/xyz

# Commit changes
git commit -m "Add xyz feature"

# Push to the branch
git push origin feature/xyz

# Open a pull request on GitHub

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

infrahealth-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

infrahealth-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file infrahealth-0.1.0.tar.gz.

File metadata

  • Download URL: infrahealth-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for infrahealth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6bff0c7d357d30a3ed837bb833bcd72b95007c4bca1dd4ee131304d7cc85002e
MD5 59709a4c4432b16595713d208ab739f6
BLAKE2b-256 33cf005cf957c064776037fd88f944a7278c6390cd3d2d9fef5c6ebe4b49e6a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for infrahealth-0.1.0.tar.gz:

Publisher: python-publish.yml on usmansafdarktk/infrahealth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file infrahealth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: infrahealth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for infrahealth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ae2f99cc65bb8a84c7fb792dd79e9a044876f53f50d43ac8adf678ceb2a641b
MD5 5ab366bdc1010412bfcb6427cfd181b5
BLAKE2b-256 8848f34d85fe420652a1e9787900b34265bb466a453116c30b51756d2466473a

See more details on using hashes here.

Provenance

The following attestation bundles were made for infrahealth-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on usmansafdarktk/infrahealth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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