Skip to content

[receiver/k8s_cluster] Missing node metrics for k8s.node.condition_out_of_disk, k8s.node.allocatable_pods and k8s.node.allocatable_hugepages-* #23839

@atoulme

Description

@atoulme

Component(s)

No response

What happened?

Description

When performing the transition to pdata, I unwittingly didn't account for some newer allocatable resource metrics associated with nodes. The receiver accepts resource names as strings and doesn't perform a validation on them, and therefore they are not caught by the receiver at collection time.

Steps to Reproduce

Try to run the receiver with the following configuration:

clusterReceiver:
  enabled: true
  config:
    receivers:
      k8s_cluster:
        node_conditions_to_report:
          - Ready
          - DiskPressure
          - MemoryPressure
          - PIDPressure
          - NetworkUnavailable
          - OutOfDisk
        allocatable_types_to_report:
          - cpu
          - memory
          - ephemeral-storage
          - storage
          - pods
          - hugepages-1Gi
          - hugepages-2Mi

Expected Result

The collector should emit the following metrics:

  • k8s.node.condition_out_of_disk
  • k8s.node.allocatable_pods
  • k8s.node.allocatable_hugepages_1_gi
  • k8s.node.allocatable_hugepages_2_mi

Actual Result

The collector doesn't emit those metrics.

Collector version

0.80.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions