Add Loadwatch Health Analyzer for system monitoring analysis

NEW FEATURE: Loadwatch Health Analyzer
- Comprehensive system health analysis from loadwatch monitoring logs
- Time-range analysis: 1h, 6h, 24h, 7d, 30d options
- Intelligent problem detection and trending

CAPABILITIES:
- Memory pressure detection (low available memory, high swap usage)
- CPU saturation analysis (idle %, iowait, steal time)
- Load average trending and threshold detection
- Process issue detection (zombie processes, high CPU/MEM consumers)
- MySQL performance monitoring (slow queries, thread counts)
- Network connection analysis
- Historical trending across snapshots (3-minute intervals)

IMPLEMENTATION:
- modules/diagnostics/loadwatch-analyzer.sh - Main analyzer script
- Handles symlinked loadwatch directories
- Parses 7 log sections: alerts, summary, memory, CPU, tasks, MySQL, network
- Generates detailed reports with actionable recommendations
- Saves reports to tmp/ directory for review

INTEGRATION:
- Added to Performance & Diagnostics menu (option 10)
- Time range selection submenu for user-friendly access
- Updated README.md with feature documentation and usage examples

ANALYSIS FEATURES:
- Swap threshold alerts (>= 50% usage)
- CPU saturation detection (< 10% idle)
- High I/O wait warnings (> 20%)
- Zombie process tracking
- Memory availability trending (avg/min/max)
- Top CPU consumers aggregated across period

Perfect for:
- Post-incident investigation
- Capacity planning
- Performance trending
- System health monitoring
- Identifying resource bottlenecks

Works with servers that have loadwatch monitoring enabled
(logs in /root/loadwatch or /var/log/loadwatch)
This commit is contained in:
cschantz
2025-11-20 20:35:16 -05:00
parent 3006abee21
commit 0a8cb302df
3 changed files with 731 additions and 7 deletions
+27 -5
View File
@@ -11,6 +11,10 @@ server-toolkit/
├── modules/ # Modular scripts organized by category
│ │
│ ├── diagnostics/ # 🔍 System Diagnostics
│ │ ├── system-health-check.sh # Comprehensive health analysis
│ │ └── loadwatch-analyzer.sh # System health from loadwatch monitoring logs
│ │
│ ├── security/ # 🛡️ Security & Threat Analysis
│ │ ├── bot-analyzer.sh # Full bot/threat analysis
│ │ ├── live-attack-monitor.sh # Real-time attack monitoring dashboard
@@ -42,13 +46,15 @@ server-toolkit/
│ │ ├── website-error-analyzer.sh # Comprehensive website error analysis
│ │ └── 500-error-tracker.sh # Track and analyze 500 errors
│ │
│ ├── diagnostics/ # 🔍 System Diagnostics
│ │ ── system-health-check.sh # Comprehensive health analysis
│ ├── diagnostics/ # 🔍 System Diagnostics & Log Analysis
│ │ ── system-health-check.sh # Comprehensive health analysis
│ │ └── loadwatch-analyzer.sh # System health monitoring from loadwatch logs
│ │
│ ├── performance/ # 📊 Performance Analysis
│ │ ├── hardware-health-check.sh # Hardware diagnostics
│ │ ├── mysql-query-analyzer.sh # MySQL performance analysis
│ │ ── network-bandwidth-analyzer.sh # Network analysis
│ │ ── network-bandwidth-analyzer.sh # Network analysis
│ │ └── (other performance modules)
│ │
│ └── maintenance/ # 🧹 System Maintenance
│ └── cleanup-toolkit-data.sh # Clean temporary toolkit data
@@ -110,10 +116,17 @@ source /root/server-toolkit/run.sh
- **Log Integration**: Apache, PHP-FPM, cPanel error log analysis
- **Smart Recommendations**: Context-aware suggestions for fixing issues
### 🔍 System Diagnostics
### 🔍 System Diagnostics & Performance Monitoring
- **Comprehensive Health Checks**: Hardware, services, security posture
- **Loadwatch Health Analyzer**: Historical system health analysis from monitoring logs
- Time-range analysis: 1h, 6h, 24h, 7d, 30d
- Memory pressure detection and swap usage trending
- CPU saturation analysis (idle, iowait, steal time)
- Process issue detection (zombies, high CPU/MEM consumers)
- MySQL performance monitoring
- Actionable recommendations based on findings
- **Smart Recommendations**: Context-aware suggestions based on findings
- **cPanel/WHM Integration**: Native support for cPanel environments
- **Multi-Panel Support**: cPanel, InterWorx, Plesk, standalone Apache
### 📊 Session Intelligence
- **Reference Database**: Cross-module data sharing (.sysref)
@@ -168,6 +181,15 @@ bash launcher.sh
# Select: System Health Check
```
### Loadwatch System Health Analysis
```bash
bash launcher.sh
# Select: Performance & Diagnostics
# Select: Loadwatch Health Analyzer
# Choose time range: 1h, 6h, 24h, 7d, or 30d
```
## 🔧 Configuration
Edit the configuration file: