Chuyển đến nội dung chính

Mô tả

Probe wmi_perf chạy WMI (Windows Management Instrumentation) query để thu thập performance counter từ Windows host. WMI là API Windows-only — trên non-Windows probe báo unsupported. Build tag vms_heavy. Execution thực tế (WMI/COM) hiện đang deferred — probe validate config và credential nhưng chưa thực thi query trên Windows.

Config fields

FieldTypeBắt buộcDefaultMô tả
typestringPhải là "wmi_perf"
hoststringKhôngWindows host target. Để trống = localhost
namespacestringKhôngWMI namespace (ví dụ "root\\cimv2")
querystringWMI query (ví dụ "SELECT PercentProcessorTime FROM Win32_PerfFormattedData_PerfOS_Processor")
usernameSecretRefstringKhôngSecret ref cho username. Secret phải set trong env, nếu không probe bị skip
passwordSecretRefstringKhôngSecret ref cho password. Secret phải set trong env, nếu không probe bị skip

Secret resolution

Giống snmp_check — secret ref resolve qua env var. Ref được cấu hình nhưng env var không set → probe lỗi khi khởi tạo.

Ví dụ config

{
  "type": "wmi_perf",
  "host": "win-core-01",
  "namespace": "root\\\\cimv2",
  "query": "SELECT PercentProcessorTime FROM Win32_PerfFormattedData_PerfOS_Processor"
}
Với credential:
{
  "type": "wmi_perf",
  "host": "win-db-01",
  "namespace": "root\\\\cimv2",
  "query": "SELECT PercentDiskTime FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk",
  "usernameSecretRef": "WMI_USER",
  "passwordSecretRef": "WMI_PASS"
}

Lưu ý

  • Chỉ chạy trên Windows. Trên Linux/macOS probe báo unsupported và bị skip.
  • Build tag vms_heavy — không có trong package agent mặc định.
  • WMI query execution hiện đang deferred theo roadmap — probe validate config nhưng chưa chạy query thực.