- Docker: Make sure you have Docker running on your machine
- Rust: To build the binary
- Sqlite: Required for storage
- Redis: A running Redis instance
- Clone the repository
git clone https://github.com/fahdfady/cotainer-health-monitor
cd container-health-monitor- Build the project using Cargo
cargo build --release- you now have the binary as
chm
cd target/release/
./chm- from cargo:
cargo run -- [COMMAND]- from the binary
./chm [COMMAND]monitorMonitor specific containers by their names.
Options:
-n, --name <NAME>: Specify the name for one or more container names to monitor (required).-c, --cache-ttl <SECONDS>: Set the Redis cache TTL in seconds (default: 60).-w, --watch: Enable watch mode to continuously monitor containers (default: false).
Example:
cargo run -- monitor --name container1 --name container2 --cache-ttl 120 --watchThis monitors container1 and container2, caching data for 120 seconds, and continuously updates in watch mode.
monitor-allMonitor all containers running on the machine.
Options:
-c, --cache-ttl <SECONDS>: Set the Redis cache TTL in seconds (default: 60).
-w, --watch: Enable watch mode to continuously monitor containers (default: false).
Example:
cargo run -- monitor-all --cache-ttl 120 --watchThis monitors all containers on the machine, caching data for 120 seconds, and continuously updates in watch mode.
wipeWipe and Delete all data you have on the database. and start clean with a new history
Example:
cargo run -- wipeTo contribute, check the todo.md file or issues for outstanding tasks and submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.