Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

no metrics for cadvisor #87

@fengxx

Description

@fengxx

What happened:
no metrics for cadvisor due to format issue
What you expected to happen:

https://github.com/splunk/fluent-plugin-kubernetes-metrics/blob/develop/lib/fluent/plugin/in_kubernetes_metrics.rb#L600-L631
it seems it looks for metrics with container_name= but cadvisor only have container=, name=, e.g.

container_cpu_system_seconds_total{container="foo",id="id",name="name",namespace="foo",pod="pod-name"} 2356.13 1624427475226

Changes related to Kubernetes 1.16 , pod_name and container_name metric labels removed from cAdvisor metrics.
kubernetes/enhancements#1206
kubernetes/kubernetes#80376

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): 1.19.x
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions