-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Please provide mechanism to use Docker stats module via TLS #1146
Comments
Hi @mjbrowns , Glances uses the docker.from_env() method (from the Docker Python lib: https://docker-py.readthedocs.io/en/stable/client.html#docker.client.from_env), so Glances should be compatible with your TLS configuration. Just be sure that you have installed the Docker Python lib with the TLS support:
Let me know... |
ok, so. I had most of the docker environment varialbles already set up. I did not have DOCKER_CERT_PATH as I rely on the default being $HOME/.docker. I do have the docker[tls] module installed. My docker variables are set as follows: running glances -d generates a log file with the following:
I'm not quite sure you are actually using docker from_env properly. Having set my environment variables properly, I can do the following:
So, I know that the python library is working in my context. |
Hi @mjbrowns , can you try with the Glances DEVELOP branch ? ==> https://github.com/nicolargo/glances/wiki/Install-and-test-Glances-DEVELOP-version |
Well, the develop branch has different issues. Now i'm getting: ERROR -- docker plugin - Cannot get containers list ('function' object has no attribute 'list') |
What is your Docker Python lib version ? Can you try to update it:
|
Same result in console mode ? LANGUAGE=en_US.utf8 python -m glances -C ~/tmp/glances-develop/conf/glances.conf -d |
Thanks for looking at this by the way, I love glances and with docker support working it will simplify my managment of these systems a LOT! |
@mjbrowns Sorry for the delay. What is your Docker version ? Here is my version where Glances works fine:
Be aware that the Glances 3.0 DEVELOP branch breaks the compatibility with API < 1.12. |
Any heads-up ? |
Description
The docker config documentation at http://glances.readthedocs.io/en/latest/aoa/docker.html seems to indicate that there are many variables available in the docker plugin; but I can not find a list of these variables to determine if it is possible to configure TLS mode.
Skimming through the docker plugin code, it seems that the use of the local docker socket is hardcoded. As anyone in any kind of a production environment needs to be running docker in secured mode, TLS support is pretty important, and should be very easy to import. If, for example, DOCKER_TLS_VERIFY=1 and ~/.docker/*.pem files exist, the plugin could easily use the docker_py tls support. Enancing this with ini file variables would be even better.
Versions
Glances v2.11 with psutil v5.3.0
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
Logs
N/A
The text was updated successfully, but these errors were encountered: