search
数据采集 采集源配置 cpu 指标采集

cpu 指标采集

简介

采集 cpu 指标上报到 DataFlux 中

前置条件

配置

进入 DataKit 安装目录下的 conf.d/host 目录,复制 cpu.conf.sample 并命名为 cpu.conf。示例如下:

设置:

[[inputs.cpu]]
  ## Whether to report per-cpu stats or not
  #percpu = true
  ## Whether to report total system cpu stats or not
  #totalcpu = true
  ## If true, collect raw CPU time metrics.
  #collect_cpu_time = false
  ## If true, compute and report the sum of all #non-idle CPU states.
  report_active = false

配置好后,重启 DataKit 即可生效

采集指标

指标 描述 类型 单位 Tag
time_user CPU 用户态时间 float - cpu,host
time_system CPU 系统态时间 float - cpu,host
time_idle CPU 空闲态时间 float - cpu,host
time_active CPU 活跃态时间 float - cpu,host
time_nice CPU 优先级切换耗时 float - cpu,host
time_iowait CPU IO耗时 float - cpu,host
time_irq CPU irq耗时 float - cpu,host
time_softirq CPU softirq耗时 float - cpu,host
time_steal float - cpu,host
time_guest CPU guest 态耗时 float - cpu,host
time_guest_nice CPU guest nice 态耗时 float - cpu,host
usage_user CPU 用户态使用率 float percent cpu,host
usage_system CPU 系统态使用率 float percent cpu,host
usage_idle CPU 空闲态使用率 float percent cpu,host
usage_active CPU 活跃态使用率 float percent cpu,host
usage_nice CPU 优先级切换使用率 float percent cpu,host
usage_iowait CPU IO使用率 float percent cpu,host
usage_irq CPU irq使用率 float percent cpu,host
usage_softirq CPU softirq 使用率 float percent cpu,host
usage_steal CPU steal 使用率 float percent cpu,host
usage_guest CPU guest 使用率 float percent cpu,host
usage_guest_nice CPU guest_nice 使用率 float percent cpu,host