-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat][Docker] Docker cpu norms #13695
Conversation
5cac6ea
to
30620ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, can we get Godocs for the rest of the exported methods in helper.go
? Surprised hound didn't complain.
👍 sure! thank you! |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
30620ad
to
a106b3f
Compare
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle apart of the small comment it LGTM.
I have a couple of questions before merging:
In the system modules, the cpu metrics collected are optional and managed by the cpu.metrics
setting. It can be useful if more methods are added, though I think that not really needed because the overhead doesn't look so big. Did you consider doing something similar here?
Not to be done in this PR, but I think that it could be good to expose the data to calculate percentages in the events, so custom percentages can be calculated on query time. Now we have something like the number of cpus of the host in docker.cpu.system.pct
, but it is a bit counterintuitive, should we add a explicit field for that? like docker.cpu.online_cpus
?
} | ||
//if len(stats.CPUStats.CPUUsage.PercpuUsage) == 0 { | ||
// u.cpus = 1 | ||
//} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈 thank you for catching this!
Also a changelog entry will be needed. |
Thank you for reviewing this Jaime!
Yeap I was thinking about this too, however I didn't add this yet since I was not sure enough because it was not already there for |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's go on with this and please open another issue to add metrics about limited resources. Apart of adding metrics about the available CPUs, we could also check if we are collecting metrics about available memory.
This PR implements the proposal for
docker.cpu.*.norm.pct
fields described on #13343.How to test it