メインコンテンツまでスキップ

📖 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.


🔧 仕組み

Your Server                          Monitron
┌─────────────────┐ HTTP POST ┌─────────────┐
│ Agent Script │ ──────────────→ │ /agent/report│
│ (cron: every 1m)│ JSON payload │ │
│ │ │ Store metrics│
│ Collects: │ │ Update status│
│ • CPU │ └─────────────┘
│ • Memory │
│ • Disk │
│ • Network │
│ • Load │
└─────────────────┘
  1. An agent script runs on your server (via cron or Task Scheduler)
  2. It collects system metrics
  3. It sends them as JSON to your Monitron instance
  4. Monitron stores the metrics and updates the monitor status
  5. If the agent stops reporting for 5+ minutes, Monitron marks the server as Down

📊 収集されるメトリクス

メトリクスLinuxWindows
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

🚀 クイックセットアップ

  1. Create a Server Agent in the Monitron dashboard (Monitors → New → Server Agent)
  2. Copy the Agent Key that's generated
  3. Deploy the agent script on your server (Linux or Windows)
  4. Configure the cron/scheduler to run every minute
  5. Within a minute, your server appears in the dashboard! ✅

🔒 セキュリティ

  • 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