Updated readme
This commit is contained in:
parent
0417e2c1f1
commit
1315ba1315
17
README.md
17
README.md
@ -5,6 +5,7 @@ A real-time infrastructure monitoring system with intelligent status aggregation
|
||||
## Current Implementation
|
||||
|
||||
This is a complete rewrite implementing an **individual metrics architecture** where:
|
||||
|
||||
- **Agent** collects individual metrics (e.g., `cpu_load_1min`, `memory_usage_percent`) and calculates status
|
||||
- **Dashboard** subscribes to specific metrics and composes widgets
|
||||
- **Status Aggregation** provides intelligent email notifications with batching
|
||||
@ -14,7 +15,7 @@ This is a complete rewrite implementing an **individual metrics architecture** w
|
||||
|
||||
```
|
||||
cm-dashboard • ● cmbox ● srv01 ● srv02 ● steambox
|
||||
┌system───────────────────────────────────────────┐┌services────────────────────────────────────────────────────┐
|
||||
┌system──────────────────────────────┐┌services─────────────────────────────────────────┐
|
||||
│CPU: ││Service: Status: RAM: Disk: │
|
||||
│● Load: 0.10 0.52 0.88 • 400.0 MHz ││● docker active 27M 496MB │
|
||||
│RAM: ││● docker-registry active 19M 496MB │
|
||||
@ -31,8 +32,8 @@ cm-dashboard • ● cmbox ● srv01 ● srv02 ● steambox
|
||||
│ ││ ├─ ● haasp.cmtec.se 43ms │
|
||||
│ ││ ├─ ● haasp.net 43ms │
|
||||
│ ││ ├─ ● pages.cmtec.se 45ms │
|
||||
└─────────────────────────────────────────────────┘│ ├─ ● photos.cmtec.se 41ms │
|
||||
┌backup───────────────────────────────────────────┐│ ├─ ● unifi.cmtec.se 46ms │
|
||||
└────────────────────────────────────┘│ ├─ ● photos.cmtec.se 41ms │
|
||||
┌backup──────────────────────────────┐│ ├─ ● unifi.cmtec.se 46ms │
|
||||
│Latest backup: ││ ├─ ● vault.cmtec.se 47ms │
|
||||
│● Status: OK ││ ├─ ● www.kryddorten.se 81ms │
|
||||
│Duration: 54s • Last: 4h ago ││ ├─ ● www.mariehall2.se 86ms │
|
||||
@ -46,7 +47,7 @@ cm-dashboard • ● cmbox ● srv01 ● srv02 ● steambox
|
||||
│● nixosbox 2 archives 4.5MB ││ │
|
||||
│● unifi 2 archives 2.9MB ││ │
|
||||
│● vaultwarden 2 archives 305kB ││ │
|
||||
└─────────────────────────────────────────────────┘└────────────────────────────────────────────────────────────┘
|
||||
└────────────────────────────────────┘└─────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**Navigation**: `←→` switch hosts, `r` refresh, `q` quit
|
||||
@ -199,30 +200,35 @@ theme = "dark"
|
||||
The agent implements several specialized collectors:
|
||||
|
||||
### CPU Collector (`cpu.rs`)
|
||||
|
||||
- Load average (1, 5, 15 minute)
|
||||
- CPU temperature monitoring
|
||||
- Real-time process monitoring (top CPU consumers)
|
||||
- Status calculation with configurable thresholds
|
||||
|
||||
### Memory Collector (`memory.rs`)
|
||||
|
||||
- RAM usage (total, used, available)
|
||||
- Swap monitoring
|
||||
- Real-time process monitoring (top RAM consumers)
|
||||
- Memory pressure detection
|
||||
|
||||
### Disk Collector (`disk.rs`)
|
||||
|
||||
- Filesystem usage per mount point
|
||||
- SMART health monitoring
|
||||
- Temperature and wear tracking
|
||||
- Configurable filesystem monitoring
|
||||
|
||||
### Systemd Collector (`systemd.rs`)
|
||||
|
||||
- Service status monitoring (`active`, `inactive`, `failed`)
|
||||
- Memory usage per service
|
||||
- Service filtering and exclusions
|
||||
- Handles transitional states (`Status::Pending`)
|
||||
|
||||
### Backup Collector (`backup.rs`)
|
||||
|
||||
- Reads TOML status files from backup systems
|
||||
- Archive age verification
|
||||
- Disk usage tracking
|
||||
@ -270,6 +276,7 @@ Generated at 2025-10-21 19:42:42 CET
|
||||
The system follows a **metrics-first architecture**:
|
||||
|
||||
### Agent Side
|
||||
|
||||
```rust
|
||||
// Agent collects individual metrics
|
||||
vec![
|
||||
@ -280,6 +287,7 @@ vec![
|
||||
```
|
||||
|
||||
### Dashboard Side
|
||||
|
||||
```rust
|
||||
// Widgets subscribe to specific metrics
|
||||
impl Widget for CpuWidget {
|
||||
@ -403,3 +411,4 @@ sudo nixos-rebuild switch --flake .
|
||||
## License
|
||||
|
||||
MIT License - see LICENSE file for details
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user