Glances Integration: Entities spontaneously losing connections to server. However, no problems accessing via REST sensors or Web Browser

I am using a Home Assistant VM running (Virtual Box Ubuntu) using a clean/recent image on Windows 10 via a bridged network. HA Core, Supervisor, Host System, and addons are all up to date with the latest production versions.


The Glances Integration intermittently can’t reach my Glances server. Even when I was adding the Integration initially, it took a few attempts before it could reach my Glances server: (API V3)

It’s important to note that I don’t have any issues with the sensors I manually created (pointing to the same server/port). I also don’t have any issues reaching my glances server via a web browser either.

Below, is an example REST sensor I added that works very reliably:

  - platform: rest
    name: LAN Tx/s
    value_template: '{{ value_json[0].tx| multiply(0.00001)| round(2) }}'
    unit_of_measurement: KB

I can also access Glances via my web browser every time without issues:

My Glances Integration points to, port 61208 using API V3. I didn’t tick/enable the optional settings for this integration.

I’m not sure how to troubleshoot this issue since I don’t see any errors/warnings in Home Assistant’s Supervisor log. Also, all other features in Home Assistant are working great.

What’s the difference between the way the Integration connect to the Glances server verses using manually created REST sensors or using a web browser? What can I do to troubleshoot/resolve this issue?

PS: My Glances server is started using the below command-line running as a Windows Servce:
C:\Users\MKANET\AppData\Local\Programs\Python\Python37\Scripts\glances.exe -w

UPDATE: Is this issue caused by Docker dropping the ball during port forwarding (in and out of the VM)? Is there any way to troubleshoot this?

Not sure it helps, but I’ve got the same setup and the only problem I’ve had is on a couple of occasions the entities changed names (eg. sensor.glances_ha_cpu_used to sensor.glances_ha_cpu_used_2). Before I realised what was happening, it did look like entities were losing connections.

Thanks for the reply back. I have a feeling my issue might be related to me using the VM version of Home Assistant (Docker port-forwarding messing up). If that’s the case, I doubt I have any control over this issue.

Anyway, I decided to just manually create all Glances REST sensors from scratch and uninstall the Glances Integration.