Kubernetes Host Metrics
Overview
Kubernetes Host Metrics is a thin K8s-aware wrapper around the Host Metrics source. It collects node-level OS metrics (CPU, memory, disk, network, load, …) by reading the node's /proc and /sys filesystems rather than the container's. The receiver is intended to run as a DaemonSet so every node in the cluster is sampled.
The wrapper applies two K8s-specific defaults on top of Host Metrics:
root_path: /hostfs— the receiver looks for/proc,/sys, etc. under/hostfsinstead of/. The pipeline's deployment packaging mounts the node's root filesystem at/hostfsautomatically (hostPath: /→/hostfs, read-only) so this just works.scrapersUI shape — accepts a flat array (["cpu", "memory", "load"]) and anoptional_metricsarray, and translates them into the nested{cpu: true, cpu_optional: {enable: true}}map the underlying Host Metrics receiver expects. This keeps the form schema simple while preserving access to the upstream optional-metric toggles.
For the full scraper / metric list, see Host Metrics.
Supported types: Metrics
Deployment mode: DaemonSet (one pod per node). The packaging layer forces Kind: DaemonSet regardless of any other setting, since per-node host sampling only makes sense as a DaemonSet.
Basic Configuration
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
collection_interval | string | 10s | No | How often the receiver samples the host. |
scrapers | string[] | — | Yes | List of scrapers to enable. Pick from: cpu, memory, disk, filesystem, load, network, paging, processes, process, system. |
optional_metrics | string[] | [] | No | Subset of scrapers to additionally enable each scraper's optional (off-by-default) metrics for. See the Host Metrics doc for the full list. |
root_path | string | /hostfs | No | Override only when you mount the node root at a non-default path. The deployment packaging defaults this for you — leave unset in normal use. |
K8s Deployment Options
The following fields control how the resulting OpenTelemetryCollector CR / DaemonSet pod is provisioned. They are read by extractDeployMeta and applied at packaging time, not passed to the underlying receiver.
| Parameter | Type | Default | Description |
|---|---|---|---|
kind | string | DaemonSet | Workload kind. Forced to DaemonSet for this source — overrides are ignored. |
priorityClass | bool | false | When true, applies priorityClassName to the pod. |
priorityClassName | string | — | The PriorityClass to assign (typically system-node-critical for node-agent workloads). |
apply_tolerations | bool | false | When true, the pod tolerates all taints — required to schedule on tainted nodes (control-plane, GPU, etc.). |
Example Configuration
{
"collection_interval": "30s",
"scrapers": ["cpu", "memory", "disk", "filesystem", "load", "network"],
// Enable optional metrics for cpu and memory only
"optional_metrics": ["cpu", "memory"],
// K8s deploy options
"priorityClass": true,
"priorityClassName": "system-node-critical",
"apply_tolerations": true,
}
Notes
- Volume mount is automatic. When this source is used in a pipeline, the cloud-side packaging adds
hostPath: /mounted read-only at/hostfson the DaemonSet pod. You don't need to declare it. processscraper requires elevated privileges. Listing other processes' details means the collector pod must run with sufficient host visibility — typicallyhostPID: trueandsecurityContext.runAsUser: 0. The default unprivileged collector image will silently see only its own process.- DaemonSet merge. When a pipeline contains two or more of
k8s_logs,k8s_kubeletstats, andk8s_hostmetrics, all of them are co-located in a single per-node DaemonSet (<pipeline>-node-agent) instead of separate ones. Default on — setADL_K8S_MERGE_NODE_AGENT=falseon the cloud side to opt out. See the pipeline architecture doc.