📖 Server Agents Overview
Monitron Server Agents are lightweight scripts that run on your servers and report system metrics back to your Monitron instance. They give you full visibility into CPU, memory, disk, network, and load averages.
🔧 Como Funciona
Your Server Monitron
┌─────────────────┐ HTTP POST ┌─────────────┐
│ Agent Script │ ──────────────→ │ /agent/report│
│ (cron: every 1m)│ JSON payload │ │
│ │ │ Store metrics│
│ Collects: │ │ Update status│
│ • CPU │ └─────────────┘
│ • Memory │
│ • Disk │
│ • Network │
│ • Load │
└─────────────────┘
- An agent script runs on your server (via cron or Task Scheduler)
- It collects system metrics
- It sends them as JSON to your Monitron instance
- Monitron stores the metrics and updates the monitor status
- If the agent stops reporting for 5+ minutes, Monitron marks the server as Down
📊 Metricas Recopiladas
| Metrica | Linux | Windows |
|---|---|---|
| CPU Usage % | ✅ via top | ✅ via WMI |
| CPU I/O Wait | ✅ | ❌ (not available on Windows) |
| Memory Usage % | ✅ via free | ✅ via WMI |
| Memory Total (MB) | ✅ | ✅ |
| Swap Usage % | ✅ | ✅ |
| Disk Usage (per mount) | ✅ via df | ✅ via WMI |
| Network RX/TX (bytes) | ✅ via /sys/class/net | ✅ via Get-NetAdapterStatistics |
| Load Averages (1/5/15m) | ✅ via /proc/loadavg | ❌ (uses CPU% instead) |
| OS Name | ✅ | ✅ |
| Hostname | ✅ | ✅ |
| Kernel Version | ✅ | ✅ |
🚀 Configuracion Rapida
- Create a Server Agent in the Monitron dashboard (Monitors → New → Server Agent)
- Copy the Agent Key that's generated
- Deploy the agent script on your server (Linux or Windows)
- Configure the cron/scheduler to run every minute
- Within a minute, your server appears in the dashboard! ✅
🔒 Seguridad
- The agent authenticates using a unique Agent Key
- Communication is over HTTPS (recommended)
- The agent only sends data — it never receives commands
- No ports need to be opened on the monitored server