Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mistake metric value of kubernetes.pod.cpu.usage.limit.pct #34064

Closed
zhongxp1219 opened this issue Dec 16, 2022 · 4 comments
Closed

mistake metric value of kubernetes.pod.cpu.usage.limit.pct #34064

zhongxp1219 opened this issue Dec 16, 2022 · 4 comments
Labels
needs_team Indicates that the issue/PR needs a Team:* label Stalled

Comments

@zhongxp1219
Copy link

Hi, We are using metricbeat to collects k8s pods cpu. In the beginning, it can collects the cpu correctly. After running for serveral weeks or serveral months, we found that one of the pods cpu usage metricbeat collects is lower than actually used. Finally, it recovers while we restart the metricbeat. We can see as follows graph.

1.Metricbeat configuration:
image

2.Cpu usage in grafana:
cpu

By the way, the node is 16U, and i found that the code will use nodeCore to calculate if failed to find container cores

coresLimit := perfMetrics.ContainerCoresLimit.GetWithDefault(cuid, nodeCores)

the request and limit of service is 1U, the node is 16U, if nodeCores was used to calculate, then the cpu.usage is equals to %3.
the problem is that may be the nodeCores is used to calculate for kubernetes.pod.cpu.usage.limit.pct ?

For confirmed bugs, please report:

Version: 7.6.0
Operating System: EulerOS 2.7
Discuss Forum URL: https://discuss.elastic.co/t/metricbeat-collects-k8s-pods-cpu-which-is-lower-than-actually-used/279215
Steps to Reproduce: it happenes randomly

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 16, 2022
@botelastic
Copy link

botelastic bot commented Dec 16, 2022

This issue doesn't have a Team:<team> label.

@zhongxp1219
Copy link
Author

hi,anybody can help to fix it ?

1 similar comment
@zhongxp1219
Copy link
Author

hi,anybody can help to fix it ?

@botelastic
Copy link

botelastic bot commented Jan 4, 2024

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label Stalled
Projects
None yet
Development

No branches or pull requests

1 participant