DevOps Monitor CLI
A lightweight, high-performance, cross-platform command-line utility built with Go that aggregates host telemetry, Docker container status, and Kubernetes cluster metrics into a unified, human-readable infrastructure health report.
š Features
Real-Time Host Diagnostics
Collects live system telemetry using cross-platform system APIs powered by gopsutil, including:
- CPU utilization and load statistics
- Memory consumption metrics
- Disk usage and capacity information
- Active process and thread insights
Parallel Metrics Collection
Leverages Go concurrency primitives for maximum performance:
- Goroutines
sync.WaitGroup
sync.Mutex
All subsystem checks execute concurrently to minimize scan latency.
Docker & Kubernetes Monitoring
Integrates directly with local orchestration environments:
- Docker daemon status and container states
- Kubernetes cluster node and pod metrics
- Local
kubectl context inspection
Intelligent Health Analysis
Converts raw telemetry into actionable infrastructure health states:
| Status | Description |
|---|
| HEALTHY | System operating within acceptable thresholds |
| WARNING | Resource usage approaching limits |
| CRITICAL | Resource usage exceeds safe thresholds |
š Architecture
The application follows a modular and thread-safe workflow to ensure efficient metric collection and processing.
+-------------------------+
| devops-monitor CLI |
+------------+------------+
|
+------------------+------------------+
| | |
v v v
+---------------+ +---------------+ +---------------+
| OS Engine | | Docker Daemon | | Kubernetes API|
| (Goroutine) | | (Goroutine) | | (Goroutine) |
+-------+-------+ +-------+-------+ +-------+-------+
| | |
+------------------+------------------+
|
| [sync.Mutex]
v
+-------------------------+
| Metrics Cache Struct |
+------------+------------+
|
v
+-------------------------+
| Health Analyzer Engine |
+------------+------------+
|
v
+-------------------------+
| Terminal Report Output |
+-------------------------+
š Workflow
1. Trigger
The operator executes the CLI with a scan command.
2. Collection
Independent goroutines gather:
- Host operating system metrics
- Docker container information
- Kubernetes cluster statistics
3. Aggregation
Collected metrics are synchronized and stored safely using mutex-protected structures.
4. Analysis
The health engine evaluates collected data against predefined thresholds.
5. Reporting
A consolidated infrastructure report is rendered to the terminal.
š Project Structure
devops-monitor/
āāā .github/
ā āāā workflows/
ā āāā release.yml # GitHub Actions CI/CD pipeline
āāā bin/ # Compiled executables
āāā internal/
ā āāā collector/
ā ā āāā orchestrator.go # Docker & Kubernetes collectors
ā ā āāā os.go # Host system telemetry collector
ā āāā engine/
ā ā āāā scanner.go # Parallel execution and health scoring
ā āāā models/
ā ā āāā models.go # Shared telemetry models
ā āāā report/
ā āāā renderer.go # Terminal report renderer
āāā build.sh # Build automation script
āāā go.mod # Dependency definitions
āāā go.sum # Dependency checksums
āāā main.go # Application entry point
š¦ Installation
Windows
Option A ā Winget (Recommended)
winget install devops-monitor
Option B ā Manual Installation
-
Download the latest Windows binary from the project's Releases page.
-
Rename the executable:
Rename-Item .\devops-monitor-windows-amd64.exe .\devops-monitor.exe
-
Move the binary to a preferred directory.
-
Add the directory to your system PATH.
Linux & macOS
Option A ā Homebrew
brew tap srinivas-batthula/tap
brew install devops-monitor
Option B ā SnapCraft
sudo snap install devops-monitor --classic
Option C ā Manual Installation
Linux (AMD64)
curl -L -o devops-monitor \
https://github.com/srinivas-batthula/devops-monitor/releases/download/v1.0.2/devops-monitor-linux-amd64
chmod +x devops-monitor
sudo mv devops-monitor /usr/local/bin/
macOS (Apple Silicon)
curl -L -o devops-monitor \
https://github.com/srinivas-batthula/devops-monitor/releases/download/v1.0.2/devops-monitor-darwin-arm64
chmod +x devops-monitor
sudo mv devops-monitor /usr/local/bin/
ā¶ Usage
Run a complete infrastructure scan:
devops-monitor scan
š Sample Output
========================================
DEVOPS MONITOR REPORT
========================================
OS Architecture : windows
Active Goroutines : 4
Logical CPU Cores : 8
CPU Utilization : 24.52%
Memory Utilization: 58.11%
Disk Allocation : 47.30%
----------------------------------------
Docker Container State:
Running : 3
Stopped : 1
----------------------------------------
Kubernetes Cluster State:
Active Nodes : 1
Monitored Pods : 14
----------------------------------------
OVERALL ENGINE HEALTH STATUS: HEALTHY
========================================
ā” Technology Stack
- Go
- gopsutil
- Docker CLI
- kubectl
- GitHub Actions
- Goroutines
- sync.WaitGroup
- sync.Mutex
š Requirements
Ensure the following tools are available if Docker and Kubernetes monitoring are enabled:
- Docker Engine / Docker Desktop
- Kubernetes CLI (
kubectl)
- Valid Kubernetes context configuration
š License
Licensed under the MIT License.
š¤ Contributing
Contributions, bug reports, and feature requests are welcome.
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a Pull Request
Built with ā¤ļø using Go.