Skip to content

host-cpu datasource

The host-cpu datasource collects information about CPUs from the operating system and creates metric data points and entities.

Metrics

Name Units Description
cpu.usage_guest percent Percent of CPU used for guest activity
cpu.usage_guest_nice percent Percent of CPU used for guest nice activity
cpu.usage_idle percent Percent of CPU used for idleness
cpu.usage_iowait percent Percent of CPU used for IO Waiting activity
cpu.usage_irq percent Percent of CPU used for IRQ activity
cpu.usage_nice percent Percent of CPU used for Nice activity
cpu.usage_softirq percent Percent of CPU used for Soft IRQ activity
cpu.usage_steal percent Percent of CPU used for Steal activity
cpu.usage_system percent Percent of system used for System activity
cpu.usage_user percent Percent of CPU used for User activity

Name styles

This datasource supports two mutually exclusive naming styles for the metrics that it collects:

  • canonical: The default style, which features namespace prefixes.
  • linuxMonitorZenPack: The legacy style, used in the Linux Monitor ZenPack.

To change the default style, set the metric-names-variant property in the datasource section to linuxMonitorZenPack.

Canonical style ZenPack style
cpu.usage_guest cpu_guest
cpu.usage_guest_nice cpu_guestNice
cpu.usage_idle cpu_ssCpuIdle
cpu.usage_iowait cpu_ssCpuWait
cpu.usage_irq cpu_ssCpuInterrupt
cpu.usage_nice cpu_ssCpuNice
cpu.usage_softirq cpu_ssCpuSoftInterrupt
cpu.usage_steal cpu_ssCpuSteal
cpu.usage_system cpu_ssCpuSystem
cpu.usage_user cpu_ssCpuUser

Entities

This datasource collects the following entity properties on Linux hosts and creates one entity per logical processor.

Property Description
cacheSizeL2 Size of the L2 cache, in bytes
clockspeed CPU speed, in megahertz
coreId Physical core index
cores Number of logical processors (always 1)
cpu Numeric index of logical core
family CPU family number
flags List of instructions supported by a CPU
manufacturer Name of the CPU maker
microcode Microcode version
model CPU model number
modelName CPU model name
name CPU name
socket Numeric ID of a socket in multi-socket systems (0 in single-socket systems)
stepping Base clock speed multiplier

Example

{
  "cacheSizeL2": "8192",
  "clockspeed": "1991.999",
  "coreId": "0",
  "cores": "1",
  "cpu": "0",
  "family": "6",
  "flags": [
    "fpu",
    "vme",
    "popcnt",
    "aes",
    "xsave",
    "avx",
    "hypervisor",
    "lahf_lm",
    "arat"
  ],
  "manufacturer": "GenuineIntel",
  "microcode": "0xffffffff",
  "model": "142",
  "modelName": "Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz",
  "name": "ServerStation1 - cpu0",
  "socket": "0",
  "stepping": "10"
}

Configuration

If you specify the host-cpu datasource during installation, its configuration file is placed in the following location:

/etc/zendatamon-configs/configs/host-cpu.config.yaml

Otherwise, you must copy it from the templates directory:

cp /etc/zendatamon-configs/.templates/.configs/host-cpu.config.yaml \
  /etc/zendatamon-configs/configs/host-cpu.config.yaml

The Zenoss Cloud agent service monitors the /etc/zendatamon-configs/configs directory and loads any new or changed configuration files immediately.

Properties

interval (number)
The number of seconds to wait between collection attempts. This value overrides the defaultInterval value in the Zenoss Cloud agent service configuration file.
timeout (number)
The number of seconds to wait before dropping a collection attempt.
metric-names-variant (string, default = canonical)
The metric name style, either canonical or linuxMonitorZenPack.
protocol (string, default = local)
Collection type; only local is supported, so this key can be omitted.

Example

apiVersion: v1
kind: datasource
name: host-cpu
spec:
  type: host-cpu
  datasource:
    interval: 60 
    timeout: 30
    metric-names-variant: canonical
    protocol: ""