← ClaudeAtlas

health-monitoringlisted

Monitor system health, track metrics, detect anomalies, and generate alerts for the multi-agent orchestration system.
othmane55/claude-collective-intelligence · ★ 4 · DevOps & Infrastructure · score 67
Install: claude install-skill othmane55/claude-collective-intelligence
# Health Monitoring Comprehensive monitoring and observability for distributed agent systems. ## Quick Start ### Basic Monitoring ```javascript import AgentOrchestrator from './scripts/orchestrator.js'; const monitor = new AgentOrchestrator('monitor'); await monitor.initialize(); // Subscribe to all status updates await monitor.client.subscribeStatus('agent.status.#', async (status) => { console.log('Status update:', status); }); ``` ### Real-Time Dashboard ```javascript // scripts/monitor.js provides built-in dashboard import './scripts/monitor.js'; // Displays: // - Agent health // - Queue metrics // - Performance stats // - Active alerts ``` ## Monitoring Components ### 1. Agent Health Tracking ```javascript const agentHealth = new Map(); // Track heartbeats await client.subscribeStatus('agent.status.*', (status) => { const { agentId, state } = status.status; agentHealth.set(agentId, { state, lastSeen: Date.now(), healthy: state !== 'disconnected' }); }); // Periodic health check setInterval(() => { const now = Date.now(); const unhealthyAgents = []; for (const [agentId, health] of agentHealth.entries()) { const elapsed = now - health.lastSeen; // No heartbeat for > 60 seconds if (elapsed > 60000) { unhealthyAgents.push(agentId); health.healthy = false; } } if (unhealthyAgents.length > 0) { sendAlert({ type: 'agent_unhealthy', agents: unhealthyAgents }); } }, 30000); ``` ### 2.