🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Server Monitor Collector

by @freepengyang

Collect server monitoring data (Zabbix / Prometheus / Alibaba / Tencent / Huawei Cloud), generate CSV/XLSX reports and send via email or Feishu.

βš™οΈ Configuration

1. Configure Environment

Create/edit ~/.hermes/.env. Only configure the sources you need:

# --- Zabbix (pick one auth method) ---
ZABBIX_URL=https://zabbix.example.com/api_jsonrpc.php
ZABBIX_USER=Admin
ZABBIX_PASSWORD=your_password

ZABBIX_TOKEN=your_api_token # optional, takes priority over password

--- Alibaba Cloud ---

ALIBABA_ACCESS_KEY_ID=your_key_id ALIBABA_ACCESS_KEY_SECRET=your_secret ALIBABA_REGION=cn-hangzhou

ALIBABA_METRICS=CPUUtilization,MemoryUtilization,InternetInRate # optional

--- Tencent Cloud ---

TENCENT_SECRET_ID=your_secret_id TENCENT_SECRET_KEY=your_secret_key TENCENT_REGION=ap-shanghai

--- Huawei Cloud ---

HUAWEI_ACCESS_KEY=your_access_key HUAWEI_SECRET_KEY=your_secret_key HUAWEI_REGION=cn-east-3

--- Notifications ---

FEISHU_CHAT_ID=oc_xxxx # optional SMTP_HOST=smtp.example.com # optional, omit to skip email SMTP_PORT=465 SMTP_FROM=alarm@example.com SMTP_TOKEN=your_token TARGET_EMAIL=admin@example.com

--- Report options ---

TOPN: show top N hosts by memory+CPU score, 0=off (default: 50)

TOPN=50

2. Install Dependencies

Zabbix / Prometheus β€” no extra deps:

python3 zabbix_cron.py

Alibaba Cloud β€” needs SDK (use uv since venv has no pip):

uv run --with aliyun-python-sdk-core --with aliyun-python-sdk-cms \
  python3 cloud_monitor.py

Tencent / Huawei β€” pure Python, only httpx needed:

uv run --with httpx python3 cloud_monitor.py

3. Run Once (Manual Test)

python3 zabbix_cron.py

Expected output:

  • ~/.hermes/cron/output/zabbix_monitor.csv
  • ~/.hermes/cron/output/zabbix_monitor.xlsx (one sheet per host group + overview + TOP sheet)
  • 4. Schedule Daily Report

    hermes cron create \
      --name "Daily Server Health Report" \
      --script zabbix_cron.py \
      --schedule "30 9 * * *"
    

    View on ClawHub
    TERMINAL
    clawhub install server-monitor-collector

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’