Improve dashboard display and fix service issues
- Remove unreachable descriptions from failed nginx sites - Show complete site URLs instead of truncating at first dot - Implement service-specific disk quotas (docker: 4GB, immich: 4GB, others: 1-2GB) - Truncate process names to show only executable name without full path - Display only highest C-state instead of all C-states for cleaner output - Format system RAM as xxxMB/GB (totalGB) to match services format
This commit is contained in:
19
CLAUDE.md
19
CLAUDE.md
@@ -332,11 +332,30 @@ rm /tmp/cm-maintenance
|
||||
4. Dashboard uses `status_level_from_agent_status()` for display
|
||||
5. Agent adds notification monitoring for status changes
|
||||
|
||||
**Testing & Building:**
|
||||
- ALWAYS use `cargo build --workspace` to match NixOS build configuration
|
||||
- Test with OpenSSL environment variables when building locally:
|
||||
```bash
|
||||
OPENSSL_DIR=/nix/store/.../openssl-dev \
|
||||
OPENSSL_LIB_DIR=/nix/store/.../openssl/lib \
|
||||
OPENSSL_INCLUDE_DIR=/nix/store/.../openssl-dev/include \
|
||||
PKG_CONFIG_PATH=/nix/store/.../openssl-dev/lib/pkgconfig \
|
||||
OPENSSL_NO_VENDOR=1 cargo build --workspace
|
||||
```
|
||||
- This prevents build failures that only appear in NixOS deployment
|
||||
|
||||
**Notification System:**
|
||||
- Universal automatic detection of all `_status` fields across all collectors
|
||||
- Sends emails from `hostname@cmtec.se` to `cm@cmtec.se` for any status changes
|
||||
- Status stored in-memory: `HashMap<"component.metric", status>`
|
||||
- Recovery emails sent when status changes from warning/critical → ok
|
||||
|
||||
**NEVER:**
|
||||
- Add hardcoded thresholds to dashboard widgets
|
||||
- Calculate status in dashboard with different thresholds than agent
|
||||
- Use "ok" as default when agent status is missing (use "unknown")
|
||||
- Calculate colors in widgets (TableBuilder's responsibility)
|
||||
- Use `cargo build` without `--workspace` for final testing
|
||||
|
||||
# Important Communication Guidelines
|
||||
|
||||
|
||||
Reference in New Issue
Block a user