System Admin Module Overview (dsysadmin)
The dsysadmin package provides a suite of specialized tools for monitoring, managing, and diagnosing Linux servers, deeply integrated with AI analysis.
Key Features
- Command Sets: Pre-defined groupings of Linux diagnostic commands (e.g., "Health", "Performance", "Security", "cPanel").
- AI Health Analysis: Automatically feeds the raw output of these command sets into the
assistantmodule to generate human-readable health reports. - Rate Limiting: Protects external APIs (like WHM/cPanel) by limiting the frequency of automated health checks.
- Integration: Primarily utilized by the
sysadminandsashaagents to respond to NOC alerts.
Key Files
dsysadmin/dsysadmin.go: The core logic for command execution and AI analysis routing.
AI Analysis Workflow
Instead of requiring an agent to manually run commands one by one, dsysadmin automates the heavy lifting:
- A NOC alert triggers a check.
dsysadminexecutes a "Performance" command set (e.g.,uptime,free -m,iostat,dmesg) over SSH.- The concatenated raw output is packaged into a specific prompt.
- This prompt is sent to
assistant.QueryAssistant, forcing the LLM to act purely as an analytical parser rather than a tool-user. - The generated SITREP report is returned to the user or admin channel.
Guidance for AI Agents
- Leverage dsysadmin: If you need a comprehensive view of a server, use the
sysadmin_health_checktools instead of manually typingtop,df, etc. It is much faster and token-efficient.