396 Commits

Author SHA1 Message Date
f786d054f2 Fix nginx config parsing for NixOS systemd format
Improve parsing of nginx config path from systemd ExecStart to handle
both traditional format and NixOS argv[] format. This should fix nginx
sites not being detected when running as a systemd service.
2025-10-13 12:12:36 +02:00
b0d7d5ce35 Testing 2025-10-13 11:23:49 +02:00
cd4764596f Implement comprehensive dashboard improvements and maintenance mode
- Storage widget: Restructure with Name/Temp/Wear/Usage columns, SMART details as descriptions
- Host navigation: Only cycle through connected hosts, no disconnected hosts
- Auto-discovery: Skip config files, use predefined CMTEC host list
- Maintenance mode: Suppress notifications during backup via /tmp/cm-maintenance file
- CPU thresholds: Update to warning ≥9.0, critical ≥10.0 for production use
- Agent-dashboard separation: Agent provides descriptions, dashboard displays only
2025-10-13 11:18:23 +02:00
bb69f0f31b Testing 2025-10-13 10:23:42 +02:00
42aaebf6a7 Testing 2025-10-13 09:57:43 +02:00
d76302e1c4 Testing 2025-10-13 08:45:12 +02:00
859df2dec1 Testing 2025-10-13 08:38:57 +02:00
5e8a0ce108 Testing 2025-10-13 08:31:18 +02:00
3de1e0db19 Updated readme 2025-10-13 08:13:20 +02:00
bab387c74d Refactor services widget with unified system metrics display
- Rename alerts widget to hosts widget for clarity
- Add sub_service field to ServiceInfo for display differentiation
- Integrate system metrics (CPU load, memory, temperature, disk) as service rows
- Convert nginx sites to individual sub-service rows with tree structure
- Remove nginx site checkmarks - status now shown via row indicators
- Update dashboard layout to display system and service data together
- Maintain description lines for connection counts and service details

Services widget now shows:
- System metrics as regular service rows with status
- Nginx sites as sub-services with ├─/└─ tree formatting
- Regular services with full resource data and descriptions
- Unified status indication across all row types
2025-10-13 08:10:38 +02:00
c68ccf023e Testing 2025-10-13 00:28:06 +02:00
57b676ad25 Testing 2025-10-13 00:16:24 +02:00
9e344fb66d Testing 2025-10-12 22:31:46 +02:00
4d8bacef50 Testing 2025-10-12 20:35:09 +02:00
d9edcda36c Testing 2025-10-12 20:29:08 +02:00
d08d8f306a Implement comprehensive status calculation and notification system
Agent Changes:
• Add CPU status thresholds (warning: ≥5.0, critical: ≥8.0)
• Add memory status thresholds (warning: ≥80%, critical: ≥95%)
• Add service status calculation (critical if failed>0, warning if degraded>0)
• All collectors now calculate and include status in output

Dashboard Changes:
• Update system widget to use agent-calculated cpu_status and memory_status
• Update services widget to use agent-calculated services_status
• Remove client-side status calculations in favor of agent status
• Add status_level_from_agent_status helper function

Notification System:
• Add SMTP email notification system using lettre crate
• Auto-configure notifications: hostname@cmtec.secm@cmtec.se
• Smart change detection with rate limiting (30min cooldown)
• Only notify on transitions to/from warning/critical states
• Rich email formatting with host, component, metric details
2025-10-12 20:04:40 +02:00
59bc3adad5 Testing 2025-10-12 19:57:05 +02:00
9c836e0862 Testing 2025-10-12 19:32:47 +02:00
fb91d8346f Testing 2025-10-12 19:13:19 +02:00
0b1d3ae0ad Testing 2025-10-12 19:02:50 +02:00
c8c91bdfec Testing 2025-10-12 18:58:07 +02:00
c312916687 Testing 2025-10-12 18:55:15 +02:00
75910610e4 Testing 2025-10-12 18:39:03 +02:00
0656af17f2 Testing 2025-10-12 18:31:44 +02:00
b65d29d86b Testing 2025-10-12 18:30:33 +02:00
53cb6510d0 Testing 2025-10-12 18:10:05 +02:00
b226217ba4 Testing 2025-10-12 18:03:32 +02:00
49aee702f2 Testing 2025-10-12 17:29:29 +02:00
088c42e55a Testing 2025-10-12 17:25:15 +02:00
4bb36b7735 Testing 2025-10-12 17:21:05 +02:00
cd593e32d2 Testing 2025-10-12 16:40:38 +02:00
18fc1f5b16 Testing 2025-10-12 16:37:40 +02:00
002c17d23d Testing 2025-10-12 16:33:45 +02:00
e9d42568fb Testing 2025-10-12 16:29:31 +02:00
b287eb35fd Testing 2025-10-12 16:23:22 +02:00
d77139b172 Testing 2025-10-12 16:14:38 +02:00
d33b24318a Testing 2025-10-12 16:08:44 +02:00
bd6c14c8c1 Testing 2025-10-12 16:01:56 +02:00
c3dbaeead2 Optimize agent CPU usage with throttled service descriptions 2025-10-12 15:13:42 +02:00
656d410a7a Testing 2025-10-12 14:58:10 +02:00
2239badc8a Testing 2025-10-12 14:53:27 +02:00
2581435b10 Implement per-service disk usage monitoring
Replaced system-wide disk usage with accurate per-service tracking by scanning
service-specific directories. Services like sshd now correctly show minimal
disk usage instead of misleading system totals.

- Rename storage widget and add drive capacity/usage columns
- Move host display to main dashboard title for cleaner layout
- Replace separate alert displays with color-coded row highlighting
- Add per-service disk usage collection using du command
- Update services widget formatting to handle small disk values
- Restructure into workspace with dedicated agent and dashboard packages
2025-10-11 22:59:16 +02:00
82afe3d4f1 Restructure into workspace with dashboard and agent 2025-10-11 14:19:05 +02:00
65d31514a1 Updated readme 2025-10-11 13:38:42 +02:00
656cb5943b Switch dashboard to ZMQ gossip data source 2025-10-11 13:36:46 +02:00
100056b790 Initial commit 2025-10-11 11:46:40 +02:00