Skip to main content

Description

The host_resource probe collects host-level resource metrics: CPU usage, memory usage, disk utilization, disk I/O, and network traffic. This is a pure collector — it emits gauge/counter metrics only, no check result. Requires the HostAdapter platform adapter — supported on Linux and Windows only. If the adapter is unavailable on the current platform, the probe is skipped at construction.

Config fields

FieldTypeRequiredDefaultDescription
typestringYesMust be "host_resource"
collectCpuboolNofalseEnable CPU usage percent collection
collectMemoryboolNofalseEnable memory usage percent collection
collectDiskboolNofalseEnable disk usage percent collection per mount point
collectDiskIoboolNofalseEnable disk read/write bytes collection per device
collectNetworkboolNofalseEnable network rx/tx bytes, errors, drops collection per interface
diskMountsstring[]Noall mountsMount points to monitor. Empty = all
diskDevicesstring[]Noall devicesDisk devices for I/O monitoring. Empty = all real block devices (skips loop/ram)
networkInterfacesstring[]Noall interfacesNetwork interfaces to monitor. Empty = all
At least one collect* flag must be enabled, otherwise the probe fails at construction.

Metrics

MetricTypeUnitLabelsCondition
vms.host.cpu.usage_percentgaugepercentcollectCpu = true
vms.host.memory.usage_percentgaugepercentcollectMemory = true
vms.host.disk.usage_percentgaugepercentmountcollectDisk = true
vms.host.disk.read_bytescounterbytesdevicecollectDiskIo = true
vms.host.disk.write_bytescounterbytesdevicecollectDiskIo = true
vms.host.network.rx_bytescounterbytesifacecollectNetwork = true
vms.host.network.tx_bytescounterbytesifacecollectNetwork = true
vms.host.network.rx_errorscounterifacecollectNetwork = true
vms.host.network.rx_dropscounterifacecollectNetwork = true
vms.host.network.tx_errorscounterifacecollectNetwork = true
vms.host.network.tx_dropscounterifacecollectNetwork = true
vms.host.uptime_secondsgaugesecondsAlways collected when supported

Example config

{
  "type": "host_resource",
  "collectCpu": true,
  "collectMemory": true,
  "collectDisk": true,
  "collectDiskIo": true,
  "collectNetwork": true,
  "diskMounts": ["/", "/data"],
  "diskDevices": ["sda", "nvme0n1"],
  "networkInterfaces": ["eth0", "bond0"]
}
Minimal config:
{
  "type": "host_resource",
  "collectCpu": true,
  "collectMemory": true
}

Notes

  • If one metric family fails (e.g. nonexistent disk mount), the probe continues collecting other families and reports degraded status rather than failing entirely.
  • Counter metrics (disk I/O, network) are cumulative since boot — downstream computes rates by differencing consecutive samples.