ssh_monitor
Monitor CPU, RAM, disk, network, and process usage on remote servers to track system performance and resource utilization.
Instructions
Monitor system resources (CPU, RAM, disk) on remote server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | Server name from configuration | |
| type | No | Type of monitoring (default: overview) | |
| interval | No | Update interval in seconds for continuous monitoring | |
| duration | No | Duration in seconds for continuous monitoring |
Implementation Reference
- src/tool-registry.js:30-38 (registration)Registration of the 'ssh_monitor' tool within the monitoring group in the TOOL_GROUPS export, used for tool registration and configuration management.// Monitoring group (6 tools) - System health and monitoring monitoring: [ 'ssh_health_check', 'ssh_service_status', 'ssh_process_manager', 'ssh_monitor', 'ssh_tail', 'ssh_alert_setup' ],
- src/health-monitor.js:357-413 (helper)Core helper functions for comprehensive system monitoring, including building multi-metric health check commands (CPU, memory, disk, load, uptime, network) and parsing results into structured data with health status. Likely used by the ssh_monitor tool handler.export function buildComprehensiveHealthCheckCommand() { return ` echo "=== CPU ===" ${buildCPUCheckCommand()} echo "=== MEMORY ===" ${buildMemoryCheckCommand()} echo "=== DISK ===" ${buildDiskCheckCommand('all')} echo "=== LOAD ===" ${buildLoadAverageCommand()} echo "=== UPTIME ===" ${buildUptimeCommand()} echo "=== NETWORK ===" ${buildNetworkCheckCommand()} `.trim(); } /** * Parse comprehensive health check output */ export function parseComprehensiveHealthCheck(output) { const sections = output.split('=== ').filter(s => s); const result = {}; for (const section of sections) { const [name, ...content] = section.split('\n'); const data = content.join('\n').trim(); switch (name.toLowerCase().trim()) { case 'cpu ===': result.cpu = parseCPUUsage(data); break; case 'memory ===': result.memory = parseMemoryUsage(data); break; case 'disk ===': result.disks = parseDiskUsage(data); break; case 'load ===': result.load_average = data; break; case 'uptime ===': result.uptime = data; break; case 'network ===': result.network = parseNetworkStats(data); break; } } // Determine overall health if (result.cpu && result.memory && result.disks) { result.overall_status = determineOverallHealth(result.cpu, result.memory, result.disks); } return result; }