glances
glances copied to clipboard
Containers plugin not working on v3.4.x on Home Assistant
Describe the bug Connected to Home Assistant i get no info about container (container active, container cpu used, container ram used) anymore. With 3.3.1 no problems
To Reproduce Update glances container
Expected behavior Get the existing data
Environement (please complete the following information) nicolargo/glances:3.3.1.1-full <.> nicolargo/glances:latest-full
To be completed with result of: glances --issue
@boehser-enkel Please give more details on the issue.
How is your HomeAssistant setup? Natively or with docker?
Do you have any custom config options passed to glances?
@RazCrimson perhaps the issue came from the Glances API client (https://github.com/home-assistant-ecosystem/python-glances-api) used by Home Assistant to grab the stats from the Glances server. Not sure that the change from Dockers to Containers plugin name has been taken into account.
+1 Looking into this, ignoring the glances API and just looking at the webpage view, I see the same behavior.
3.3.1.1-full:
3.4.0-full:
Any version from 3.4.0 and onwards, including latest tags, show the same behavior.
In both cases, using the following command:
docker run -it -d --restart="always" --net=host --privileged -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host nicolargo/glances:3.X.X.X-full
@boehser-enkel Please give more details on the issue.
How is your HomeAssistant setup? Natively or with docker?
Do you have any custom config options passed to glances?
sorry for the late response. Everything in doker. No custom config options for glances
I had the same issue here on my raspberry pi. Latest version 3.4 didn't show the containers. The 3.3.1.1-full did. Using docker compose.
@jslegers73 @iliabaranov
Could you please test with the latest release 3.4.0.3-full
?
I am able to get the containers plugin working with the publish image
@RazCrimson I had a try today and unfortunately it doesn't work for me. I also tried the dev tag without success. Rolling back to version 3.3.1.1-full was the only way to solve the issue and getting data for the running containers again.
@RazCrimson perhaps the issue came from the Glances API client (home-assistant-ecosystem/python-glances-api) used by Home Assistant to grab the stats from the Glances server. Not sure that the change from Dockers to Containers plugin name has been taken into account.
This is indeed the problem. I have opened an issue there.
@RazCrimson I can confirm that it now works with version 3.4.0.3 on docker running on a pi. I don't use Home Assistant.
Ah indeed 3.4.0.3 seems to work correctly in console mode, but somehow no container data shows up in my grafana instance. I need to check if the data is not registered properly into the influxdb2 database or if there is an issue at the grafana level.
I use the following env variable to enable the export:
GLANCES_OPT=-q --export influxdb2 --time 10 -C /glances/conf/glances.conf
[influxdb2]
host=localhost
port=8086
protocol=http
org=<my_org>
bucket=glances
token=<my_token>
(this used to work up to now -- I'll continue digging)
EDIT: There is indeed an issue related to the influxdb2 option not logging anything: https://github.com/nicolargo/glances/issues/2459
I can just add that my containers view also disappeared for v.3.4.x.x Back on v3.3.1 they show fine. My Docker setup is running on an Open Media Vault server. So it seems related to this.
As already said (https://github.com/nicolargo/glances/issues/2430#issuecomment-1565313476), the issue came from the Glances-API client used by Home Assistant to grab the stats.
A issue is opened (but not implemented) to change the client in order to use container instead of docker in the API: https://github.com/home-assistant-ecosystem/python-glances-api/issues/18
This issue is stale because it has been open for 3 months with no activity.
I'm seeing containers listed again, so all looks good my side.
Closing as the issue is fixed.