Skip to content

[receiver/kubeletstat] k8s.node.cpu.usage metric is identical to k8s.node.cpu.utilization #38675

Closed
@oshamin

Description

@oshamin

Component(s)

receiver/kubeletstats

What happened?

Description

We use Otel Collector version otel/opentelemetry-collector-contrib:0.120.0 to ingest metrics from Kubernetes via kubeletstatsreceiver into ClickHouse.

I've noticed that the results for the following metrics are identical:

k8s.node.cpu.usage - Total CPU usage (sum of all cores per second) averaged over the sample window

k8s.node.cpu.utilization - Node CPU utilization

select TimeUnix, MetricName, Value, ResourceAttributes, Attributes
from otel.otel_metrics_gauge
where
    (MetricName = 'k8s.node.cpu.usage' OR MetricName = 'k8s.node.cpu.utilization')
 AND ResourceAttributes['k8s.node.name'] = 'ip-10-31-49-125.eu-central-1.compute.internal'
 AND TimeUnix >= NOW() - INTERVAL 120 SECOND
ORDER BY TimeUnix DESC;

Image

another query with similar result

Image

Steps to Reproduce

Install the Otel Collector using the official Helm chart (0.117.3).
Enable kubeletstatsreceiver for ingestion and activate the optional metric k8s.node.cpu.usage.

    kubeletstats:
      auth_type: serviceAccount
      collection_interval: 10s
      endpoint: ${env:K8S_NODE_IP}:10250
      metric_groups:
        - node
        - pod
        - container
        - volume
      node: '${env:K8S_NODE_NAME}'
      k8s_api_config:
        auth_type: serviceAccount
      metrics:
        k8s.node.cpu.usage:
          enabled: true

Expected Result

k8s.node.cpu.utilization - provides CPU utilization in percentage.

Actual Result

k8s.node.cpu.utilization - provides the same result as k8s.node.cpu.usage.

Collector version

0.120.0

Environment information

Environment

EKS Cluster - Kubernetes 1.30

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions