Home > Mobile >  what provides the metric "container_cpu_usage_seconds_total" to prometheus?
what provides the metric "container_cpu_usage_seconds_total" to prometheus?

Time:02-23

Sorry in advance as this is probably a very easy question to answer, I am pretty new to prometheus and grafana and I am trying to figure out where this metric in prometheus is coming from "container_cpu_usage_seconds_total".

I have found online that all metrics starting with "node_" come from the node exporter pod. So I am just wondering if this metric is coming prometheus itself or is this also coming from the node exporter as we currently have no annotations set on our pods but are getting these metrics inside grafana.

Thanks in advance!

CodePudding user response:

The metric

container_cpu_usage_seconds_total

comes from cAdvisor service embedded in kubelet, exposed through port 10250 and endpoint /metrics/cadvisor.

The metric's source code definition is in:

cAdvisor/metrics/prometheus.go

  • Related