Loading...
Loading...
Analyze application logs to detect errors, patterns, anomalies, and generate insights. Use when troubleshooting issues or analyzing system behavior.
npx skill4agent add ntaksh42/agents log-analyzerAnalyze the following logs:
[Log file content]
Analysis items:
- Error types and frequency
- Root cause estimation
- Solution proposals2024-06-15 10:23:45 ERROR [database] Connection timeout after 30s
2024-06-15 10:23:50 ERROR [database] Connection timeout after 30s
2024-06-15 10:24:12 ERROR [database] Connection timeout after 30s
2024-06-15 10:25:33 ERROR [api] Failed to fetch user data: Database unavailable
2024-06-15 10:25:34 ERROR [api] Failed to fetch user data: Database unavailable# Log Analysis Report
## Summary
- **Analysis Period**: 2024-06-15 10:23:45 - 10:25:34 (2 minutes)
- **Total Logs**: 450 lines
- **Error Count**: 5
- **Warning Count**: 12
## Detected Issues
### [CRITICAL] Database Connection Timeout
**Frequency**: 3 times (10:23:45 - 10:24:12)
**Impact**: API request failures (2 cases)
**Log Pattern**:
**Estimated Root Causes**:
1. Database server overload
2. Network connection issues
3. Connection pool exhaustion
**Recommended Actions**:
1. Check database CPU/memory usage
2. Review slow query logs
3. Verify connection pool size
4. Measure network latency
### [HIGH] API Error Chain
**Frequency**: 2 times (occurred after DB timeout)
**Cause**: Impact of database failure
## Time-series Analysis
## Statistical Information
| Metric | Value |
|----------|-----|
| Error Rate | 1.1% (5/450) |
| Average Response | 245ms |
| Maximum Response | 30,012ms (timeout) |
| Success Rate | 98.9% |
## Recommended Responses
### Immediate Actions
1. Check database connection status
2. Restart application (reset connection pool)
3. Verify database performance
### Short-term Actions
1. Optimize connection pool size
2. Review timeout values
3. Implement retry logic
### Long-term Actions
1. Scale the database
2. Add read replicas
3. Introduce cache layer