跳转至

开启 WMI Check 监控,平台列表无数据

配置如下:

init_config:

instances:

  - class: Win32_OperatingSystem
    metrics:
      - [NumberOfProcesses, system.proc.count, gauge]
      - [NumberOfUsers, system.users.count, gauge]

  - class: Win32_PerfFormattedData_PerfProc_Process
    metrics:
      - [ThreadCount, my_app.threads.count, gauge]
      - [VirtualBytes, my_app.mem.virtual, gauge]
    filters:
      - Name: myapp
    constant_tags:
      - 'role:test'

  - class: Win32_PerfFormattedData_PerfProc_Process
    metrics:
      - [ThreadCount, proc.threads.count, gauge]
      - [VirtualBytes, proc.mem.virtual, gauge]
      - [PercentProcessorTime, proc.cpu_pct, gauge]
    filters:
      - Name: app1
      - Name: app2
      - Name: app3
    tag_by: Name

  - class: Win32_PerfFormattedData_PerfProc_Process
    metrics:
      - [IOReadBytesPerSec, proc.io.bytes_read, gauge]
    filters:
      - Name: app1
      - Name: app2
    tag_by: Name
    tag_queries:
      - [IDProcess, Win32_Process, Handle, CommandLine]

问题原因

如果开启的是默认配置,探针端会采集 system.proc.countsystem.users.count 这两项指标,所以在平台列表只会看到 system 的信息。

解决方案

只需将配置文件中 myapp, app1, app2, app3 替换为需要监控的进程名称即可。


5分钟,开启你的跨云监控之旅 (`⌄´ )