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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bff0c7d357d30a3ed837bb833bcd72b95007c4bca1dd4ee131304d7cc85002e
|
|
| MD5 |
59709a4c4432b16595713d208ab739f6
|
|
| BLAKE2b-256 |
33cf005cf957c064776037fd88f944a7278c6390cd3d2d9fef5c6ebe4b49e6a1
|
Provenance
The following attestation bundles were made for infrahealth-0.1.0.tar.gz:
Publisher:
python-publish.yml on usmansafdarktk/infrahealth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infrahealth-0.1.0.tar.gz -
Subject digest:
6bff0c7d357d30a3ed837bb833bcd72b95007c4bca1dd4ee131304d7cc85002e - Sigstore transparency entry: 264657442
- Sigstore integration time:
-
Permalink:
usmansafdarktk/infrahealth@3a411a77a3f2343899c53aab83c698f856209e9e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/usmansafdarktk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a411a77a3f2343899c53aab83c698f856209e9e -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ae2f99cc65bb8a84c7fb792dd79e9a044876f53f50d43ac8adf678ceb2a641b
|
|
| MD5 |
5ab366bdc1010412bfcb6427cfd181b5
|
|
| BLAKE2b-256 |
8848f34d85fe420652a1e9787900b34265bb466a453116c30b51756d2466473a
|
Provenance
The following attestation bundles were made for infrahealth-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on usmansafdarktk/infrahealth
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infrahealth-0.1.0-py3-none-any.whl -
Subject digest:
8ae2f99cc65bb8a84c7fb792dd79e9a044876f53f50d43ac8adf678ceb2a641b - Sigstore transparency entry: 264657445
- Sigstore integration time:
-
Permalink:
usmansafdarktk/infrahealth@3a411a77a3f2343899c53aab83c698f856209e9e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/usmansafdarktk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a411a77a3f2343899c53aab83c698f856209e9e -
Trigger Event:
release
-
Statement type: