elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
112 stars 4.93k forks source link

[metricbeat/kubernetes] Do not fallback to the Node's limit for the pod 'usage.limit.pct' metrics #39854

Closed tetianakravchenko closed 4 months ago

tetianakravchenko commented 5 months ago

For the calculation of the kubernetes.pod.cpu.usage.limit.pct we fallback to the Node's CPU limit (allocatable node cpu)https://github.com/elastic/beats/blob/v8.13.4/metricbeat/module/kubernetes/pod/data.go#L78

So if the containers of the pod do not have cpu limits defined - kubernetes.pod.cpu.usage.limit.pct will be equal to the kubernetes.pod.cpu.usage.node.pct. Similarly - for the kubernetes.pod.memory.usage.limit.pct metric - https://github.com/elastic/beats/blob/v8.13.4/metricbeat/module/kubernetes/pod/data.go#L78

Screenshot 2024-06-06 at 11 26 59

This behaviour is confusing, example - https://github.com/elastic/beats/issues/34064

tetianakravchenko commented 4 months ago

Follow up issues: