Health Monitor — System Health & Performance Monitoring
Monitor agent health, performance metrics, and resource usage with automated alerting.
Overview
This skill provides:
- Health Checks: Ping services, check disk space, memory usage
- Metric Collection: Track CPU, memory, disk, network over time
- Anomaly Detection: Detect unusual patterns in metrics
- Automated Alerting: Send alerts when thresholds exceeded
- Uptime Tracking: Monitor service availability
- Performance Reports: Generate health reports
Metrics Tracked
- System: CPU%, memory usage, disk space, load average
- Process: Node.js heap, event loop lag, active handles
- Application: Job queue depth, error rate, response time
- External: API latency, dependency health
Configuration
{
"checks": [
{
"name": "disk-space",
"type": "metric",
"threshold": 90,
"unit": "%",
"interval": "*/5 * * * *"
},
{
"name": "api-latency",
"type": "http",
"url": "https://api.anthropic.com",
"threshold_ms": 5000
}
],
"alerts": {
"channels": ["telegram"],
"quiet_hours": { "start": "22:00", "end": "08:00" }
}
}
API
const { checkHealth, getMetrics, getUptime } = require('./health-monitor');
// Run health checks
const health = await checkHealth();
// Get current metrics
const metrics = getMetrics('last_hour');
// Get uptime percentage
const uptime = getUptime('daily'); // "99.5%"
1---2name: health-monitor3description: Monitor agent health, performance, and resource usage. Track system metrics, detect anomalies, and send alerts when thresholds are exceeded.4---56# Health Monitor — System Health & Performance Monitoring78Monitor agent health, performance metrics, and resource usage with automated alerting.910## Overview1112This skill provides:13- **Health Checks**: Ping services, check disk space, memory usage14- **Metric Collection**: Track CPU, memory, disk, network over time15- **Anomaly Detection**: Detect unusual patterns in metrics16- **Automated Alerting**: Send alerts when thresholds exceeded17- **Uptime Tracking**: Monitor service availability18- **Performance Reports**: Generate health reports1920## Metrics Tracked2122- System: CPU%, memory usage, disk space, load average23- Process: Node.js heap, event loop lag, active handles24- Application: Job queue depth, error rate, response time25- External: API latency, dependency health2627## Configuration2829```json30{31 "checks": [32 {33 "name": "disk-space",34 "type": "metric",35 "threshold": 90,36 "unit": "%",37 "interval": "*/5 * * * *"38 },39 {40 "name": "api-latency",41 "type": "http",42 "url": "https://api.anthropic.com",43 "threshold_ms": 500044 }45 ],46 "alerts": {47 "channels": ["telegram"],48 "quiet_hours": { "start": "22:00", "end": "08:00" }49 }50}51```5253## API5455```javascript56const { checkHealth, getMetrics, getUptime } = require('./health-monitor');5758// Run health checks59const health = await checkHealth();6061// Get current metrics62const metrics = getMetrics('last_hour');6364// Get uptime percentage65const uptime = getUptime('daily'); // "99.5%"66```