Skip to main content
VMS agent collector chạy trên host khách hàng để thu thập metrics, checks và logs, sau đó gửi về VMS Master qua HTTPS.

Mô hình hoạt động của Agent

Cài đặt và kết nối VMS Agent

Các đầu mục chuẩn bị (Agent)


Quy trình triển khai trên Linux

1

1. Chạy script cài đặt

  • Step: Trên host cần giám sát, chạy script (không cần sudo):
  • Check: Script in tiến trình Step 1/6 ... 6/6.
  • Result: SUCCESS (verified): vms-monitor-agent <version> installed. Kết quả chạy script cài đặt agent trên Linux
2

2. Kiểm tra service

  • Step: Xem trạng thái service:
  • Check: Trạng thái hiển thị active (running).
  • Result: Binary tại ~/.local/bin/vms-monitor-agent, config tại ~/.config/vms-monitor-agent/agent.env. Trạng thái service vms-monitor-agent đang chạy
3

3. Kiểm tra logs kết nối

  • Step: Xem log thời gian thực:
  • Check: Tìm dòng log agent started kèm agentKey, probes, configVersion.
  • Result: Log dạng JSON xuất hiện, ví dụ:
    Log JSON "agent started" trên Linux
Sau khi cài xong, agent hiện trong Agent Config (FLEET) trên Dashboard (https://<VMS_MASTER_IP>/dashboards/agent-config): Agent online trong FLEET trên Dashboard

Quy trình triển khai trên Windows

1

1. Chạy script cài đặt

  • Step: Mở PowerShell (không cần quyền Administrator):
  • Check: Script in tiến trình Step 1/6 ... 6/6.
  • Result: SUCCESS (verified): vms-monitor-agent <version> installed.
2

2. Kiểm tra trạng thái agent

  • Step: Kiểm tra task auto-start và tiến trình agent:
  • Check: Task tồn tại và có process agent đang chạy.
  • Result: Binary tại %LOCALAPPDATA%\vms-monitor-agent\vms-monitor-agent.exe.
3

3. Kiểm tra logs / version

  • Step: In phiên bản:
  • Check: In ra version, commit và build date.
  • Result: Agent đang online trên Dashboard.

Quản lý agent bằng dòng lệnh

Sau khi cài, mở terminal/PowerShell mới và dùng lệnh vms-monitor-agent (không cần sudo/Administrator). Lệnh status cho biết agent đã cài / đang chạy / auto-start / version: Kết quả lệnh vms-monitor-agent status Minh hoạ stop (dừng hẳn) rồi start lại — chú ý runningauto-start đổi trạng thái theo: Vòng đời stop và start agent
stop là dừng hẳn: dừng tiến trình và tắt auto-start. Agent không tự chạy lại sau reboot. Dùng start để chạy lại hoặc uninstall để gỡ.Nếu gặp command not found, mở shell mới hoặc dùng đường dẫn đầy đủ (~/.local/bin/vms-monitor-agent trên Linux, %LOCALAPPDATA%\vms-monitor-agent\vms-monitor-agent.exe trên Windows).

Cập nhật agent

Chạy lại lệnh cài đặt:
  • Linux:
    Script so sánh phiên bản và hỏi trước khi thay binary. Nếu đã ở bản mới nhất, script báo already current: Chạy lại lệnh cài khi agent đã ở bản mới nhất
  • Windows:

Gỡ cài đặt agent

Chạy uninstall từ binary, hoặc tải lại script kèm uninstall:
  • Linux:
    Gỡ agent bằng lệnh vms-monitor-agent uninstall
  • Windows:

Troubleshooting thường gặp