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
Fix docker memory and cpu reporting in Windows #3043
Conversation
3631e38
to
8273421
Compare
closes #2457 |
@georgyturevich @eesprit I have done a few improvements to the docker plugin here, and decided to bring in the unix and windows helper functions in order for us to behave more like the docker cli. This should also fix the reporting of unset stats on Windows. It would be great if both of you could double check that everything is still working as expected. |
Hi Daniel, the code looks good to me, but I am not a big expert in Golang. If you already have some compiled binaries, I can try to test it on my environment. |
@danielnelson the new docker client code seems to break when using the regular Unix Socket :
|
Might be due to creating an httpClient and passing it to NewClient(). That was the case when it was working (httpClient was nil) so I think that is the actual problem with the TLS patch. A solution would be to parse the host string like it is done here : https://github.com/moby/moby/blob/master/client/client.go#L162 |
@eesprit Thanks for catching that, would be pretty bad if I totally broke the docker plugin. I don't see a good way to pass just the |
db9e24f
to
0a83a27
Compare
@georgyturevich Here is a Windows amd64 build for testing with. |
@danielnelson Works fine here, and metrics are corrects even with offline CPUs. |
0a83a27
to
f046fdb
Compare
@eesprit I'm splitting the tls off into it's own pull request, I'll mention you when I open it. |
Required for all PRs: