Home Assistant Community Add-on: Glances

Installed Glances add-on v0.2.0 to HA 0.89.1 running on RPi with Hass.io Resin OS 2.3.0+rev1.
When launching the web UI an it just times out. No HTTP error code, no nothing. Looks much like the same issue that dmoses1969 had.

Glances Add-on Config
    {
      "log_level": "info",
      "process_info": false,
      "refresh_time": 10,
      "ssl": true,
      "certfile": "fullchain.pem",
      "keyfile": "privkey.pem",
      "influxdb": {
        "enabled": false,
        "host": "a0d7b954-influxdb",
        "port": 8086,
        "username": "glances",
        "password": "",
        "database": "glances",
        "prefix": "localhost",
        "interval": 60
      }
    }
Glances log
    [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
    [s6-init] ensuring user provided files have correct perms...exited 0.
    [fix-attrs.d] applying ownership & permissions fixes...
    [fix-attrs.d] done.
    [cont-init.d] executing container initialization scripts...
    [cont-init.d] 00-banner.sh: executing... 
    -----------------------------------------------------------
     Hass.io Add-on: Glances v0.2.0
     A cross-platform system monitoring tool
     From: Community Hass.io Add-ons
     By: Franck Nijhof <[email protected]>
    -----------------------------------------------------------
     armhf / Resin OS 2.3.0+rev1 / HA 0.89.1 / SU 148 / stable
    -----------------------------------------------------------
    [cont-init.d] 00-banner.sh: exited 0.
    [cont-init.d] 01-log-level.sh: executing... 
    Log level is set to INFO
    [cont-init.d] 01-log-level.sh: exited 0.
    [cont-init.d] 02-updates.sh: executing... 
    INFO: You are running the latest version of this add-on
    [cont-init.d] 02-updates.sh: exited 0.
    [cont-init.d] 10-requirements.sh: executing... 
    [cont-init.d] 10-requirements.sh: exited 0.
    [cont-init.d] 11-docker.sh: executing... 
    INFO: Docker support has been enabled.
    [cont-init.d] 11-docker.sh: exited 0.
    [cont-init.d] 20-config.sh: executing... 
    [cont-init.d] 20-config.sh: exited 0.
    [cont-init.d] 30-influxdb.sh: executing... 
    [cont-init.d] 30-influxdb.sh: exited 0.
    [cont-init.d] 70-nginx.sh: executing... 
    [cont-init.d] 70-nginx.sh: exited 0.
    [cont-init.d] done.
    [services.d] starting services
    [services.d] done.
    INFO: Starting the NGINX daemon
    INFO: Starting Glances
    2019/03/12 21:35:55 [notice] 3874#3874: using the "epoll" event method
    2019/03/12 21:35:55 [notice] 3874#3874: nginx/1.14.2
    2019/03/12 21:35:55 [notice] 3874#3874: OS: Linux 4.4.50
    2019/03/12 21:35:55 [notice] 3874#3874: getrlimit(RLIMIT_NOFILE): 1048576:1048576
    2019/03/12 21:35:55 [notice] 3874#3874: start worker processes
    2019/03/12 21:35:55 [notice] 3874#3874: start worker process 4023

I’ve tried both with and without SSL and rebooted the RPi a few times. Same result.
Any ideas?

Same issue here… Web UI works perfectly, but can’t get the sensors to work.

Glances config:

{
  "log_level": "info",
  "process_info": false,
  "refresh_time": 10,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "influxdb": {
    "enabled": false,
    "host": "a0d7b954-influxdb",
    "port": 8086,
    "username": "glances",
    "password": "",
    "database": "glances",
    "prefix": "localhost",
    "interval": 60
  }
}

Sensor config:

  - platform: glances
    name: rpi
    host: 127.0.0.1
    version: 3
    ssl: true
    resources:
      - 'disk_use_percent'
      - 'memory_use_percent'
      - 'swap_use_percent'
      - 'cpu_use_percent'
      - 'cpu_temp'
      - 'processor_load'

Logs:
2019/03/24 08:41:09 [info] 12074#12074: *714 peer closed connection in SSL handshake while SSL handshaking, client: 127.0.0.1, server: 0.0.0.0:61208

Anybody knows what I’m doing wrong?

:tada: Release v0.3.0

Full Changelog

Changed

  • :arrow_up: Updates scandir to v1.10.0 (#4)
  • :arrow_up: Updates influxdb to v5.2.2 (#5)
  • :arrow_up: Updates docker to v3.7.1 (#8)
  • :arrow_up: Updates py-cpuinfo to v5 (#9)
  • :arrow_up: Updates docker to v3.7.2 (#11)
  • :arrow_up: Upgrades add-on base image to 3.0.1
  • :ambulance: Workaround Docker issue by reinstating legacy tags
  • :sparkles: Adds ARMv7 support
  • :arrow_up: Upgrades gcc to 8.2.0-r2
  • :arrow_up: Upgrades linux-headers to 4.18.13-r1
  • :arrow_up: Upgrades musl-dev to 1.1.20-r4
  • :arrow_up: Upgrades Python to 3.6.8-r1
  • :arrow_up: Upgrades py3-psutil to 5.5.0-r0
  • :hammer: Rewrite add-on onto Bashio
  • :ambulance: Adds add-on configuration to InfluxDB export
  • :rocket: Enable ARMv7 build in GitLab CI
  • :ambulance: Fixes incorrect exit code when InfluxDB export is disabled

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v0.4.0

Full Changelog

:sparkles: This release adds support for Hass.io Ingress :tada:

Breaking change

The addition of Ingress makes this add-on not accessible directly. If you have added Glances via an iframe panel, this release will break that.

However, you can enable this again by going into the add-on configuration. A new section show is visible: “Network”. Enter port 61208 (or anything else if you want) in the disabled field. Hit the “SAVE” followed by the “RESTART” button to make your iframe work as before.

An option to add an Ingress capable add-on to the sidebar menu automatically is expected to land in Home Assistant 0.92.

Besides this all, this release mainly contains maintenance upgrades, changes, and improvements.

Changed

  • :arrow_up: Upgrades base image to Python 1.1.0
  • :arrow_up: Upgrades gcc to 8.3.0-r0
  • :hammer: Removes unused files from image
  • :hammer: Refactor of init scripts
  • :sparkles: Adds Hassio Ingress support
  • :ambulance: Fixes incorrect base image in GitLab CI

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

hi guys

is it possible that the new addon broke the glances sensor??

@r3mcos3 your issue is:

Your solution is:

1 Like

Is the Asus Tinkerboard S supported by this Glances Hass.io add-on? I could never get it working. Saw ARMv7 support was added in v0.30 but I still run into the same error message below for v0.30 and the latest 0.40. I turned off Protection mode and changed add-on settings back to default, but still having issues.

ValueError: invalid attr name 'io_counters'

The Home Assistant System Health box says architecture is armv7l. Not sure if that makes a difference.

Full add-on error log below.


Hass.io Add-on: Glances
A cross-platform system monitoring tool

Add-on version: 0.4.0
You are running the latest version of this add-on.
System: HassOS 2.10 (armv7 / tinker)
Home Assistant version: 0.91.4
Supervisor version: 160

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] glances.sh: executing…
[cont-init.d] glances.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting Glances…
Traceback (most recent call last):
File “/usr/local/bin/glances”, line 11, in
load_entry_point(‘Glances==3.1.0’, ‘console_scripts’, ‘glances’)()
File “/usr/local/lib/python3.7/site-packages/glances/init.py”, line 140, in main
start(config=config, args=args)
File “/usr/local/lib/python3.7/site-packages/glances/init.py”, line 106, in start
mode = GlancesMode(config=config, args=args)
File “/usr/local/lib/python3.7/site-packages/glances/webserver.py”, line 41, in init
self.stats.update()
File “/usr/local/lib/python3.7/site-packages/glances/stats.py”, line 222, in update
self._plugins[p].update()
File “/usr/local/lib/python3.7/site-packages/glances/plugins/glances_processcount.py”, line 71, in update
glances_processes.update()
File “/usr/local/lib/python3.7/site-packages/glances/processes.py”, line 247, in update
ad_value=None)
File “/usr/local/lib/python3.7/site-packages/glances/processes.py”, line 246, in
self.processlist = [p.info for p in psutil.process_iter(attrs=standard_attrs,
File “/usr/local/lib/python3.7/site-packages/psutil/init.py”, line 1562, in process_iter
yield add(pid)
File “/usr/local/lib/python3.7/site-packages/psutil/init.py”, line 1539, in add
proc.info = proc.as_dict(attrs=attrs, ad_value=ad_value)
File “/usr/local/lib/python3.7/site-packages/psutil/init.py”, line 623, in as_dict
", ".join(map(repr, invalid_names))))
ValueError: invalid attr name ‘io_counters’

I was thinking this will disable the ingress function but it dd not :ok_hand:

Ingress cannot be disabled, nevertheless, this methods does give you a method to go around it.

1 Like

This addon seems to be flooding my HassIO system log with authentication requests. See a sample of the log below.
I believe this has been happening since the initial release of the addon.

I don’t get this for any other addon, and it’s mildly annoying that the entire log gets overrun with these messages after ~30 minutes, pushing out any other useful information.

Is there a way to change the authentication so it’s persistent, and only logs in when the addon starts?

19-04-22 14:03:48 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:03:48 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:04:50 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:04:50 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:05:51 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:05:51 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:06:52 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:06:52 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:07:53 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:07:53 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:08:55 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:08:55 INFO (MainThread) [hassio.auth] Success login from _USERNAME_
19-04-22 14:09:56 INFO (MainThread) [hassio.auth] Auth request from a0d7b954_glances for _USERNAME_
19-04-22 14:09:56 INFO (MainThread) [hassio.auth] Success login from _USERNAME_

@Silicon_Avatar Unfortunately, this is how Hass.io authentication works.

I added the galande add-on in Hassio with nabucase remote, everything works fine and ingress is awesome. However, I can’t get the sensors to work, I added config as example but nothing. Any thoughts,what I have missed?

sensor:
  - platform: glances
    host: 192.168.156.2
    username: my hass username
    password: my hasspasswd
    version: 3
    resources:
      - 'processor_load'
      - 'memory_use_percent'
      - 'disk_use_percent'

Home Assistant wants to connect to a port. Individual components itself do not support Ingress. So you have to assign a port in the add-on configuration in the Network section in order for the component to work.

1 Like

Thanks for your answer @frenck, I tried to add the port but that didn’t help.

  - platform: glances
    host: 192.168.156.2
    port: 61208

I gave me some new errors in the log

019-04-23 17:27:34 ERROR (MainThread) [glances_api] Can not load data from Glances API
2019-04-23 17:27:34 ERROR (MainThread) [homeassistant.components.glances.sensor] Unable to fetch data from Glances
2019-04-23 17:28:35 ERROR (MainThread) [glances_api] Can not load data from Glances API
2019-04-23 17:28:35 ERROR (MainThread) [homeassistant.components.glances.sensor] Unable to fetch data from Glances
2019-04-23 17:30:06 ERROR (MainThread) [glances_api] Can not load data from Glances API
2019-04-23 17:30:06 ERROR (MainThread) [homeassistant.components.glances.sensor] Unable to fetch data from Glances
2019-04-23 17:32:07 ERROR (MainThread) [glances_api] Can not load data from Glances API
2019-04-23 17:32:07 ERROR (MainThread) [homeassistant.components.glances.sensor] Unable to fetch data from Glances
2019-04-23 17:34:38 ERROR (MainThread) [glances_api] Can not load data from Glances API
2019-04-23 17:34:38 ERROR (MainThread) [homeassistant.components.glances.sensor] Unable to fetch data from Glances

Did you add port 61208 to the add-on?

image

1 Like

Yes I did, and still the same

I have also tried but with no success to get the sensors in hass. Have followed the instructions above.

I had a similar issue. I changed the port to 61208 on the add on and restarted HA and it started working

Did you use the ip of the machine, localhost (127.0.0.1) or internal ip of the container in your sensor config?

1 Like

I have tried these configurations for the sensor, but none are working:

    host: 127.0.0.1
    port: 61208
    name: "Nuc"
    username: hassuser
    password: hasspassword
    ssl: true
    verify_ssl: true
    version: 3
    resources:
      - 'disk_use_percent'
      - 'memory_use_percent'
      - 'swap_use_percent'
      - 'processor_load'
      - 'docker_active'
      - 'docker_cpu_use'
  - platform: glances
    host: 192.168.1.78
    port: 61208
    name: "Nuc 1"
    username: hassuser
    password: hasspassword
    ssl: true
    verify_ssl: true
    version: 3
    resources:
      - 'disk_use_percent'
      - 'memory_use_percent'
      - 'swap_use_percent'
      - 'processor_load'
      - 'docker_active'
      - 'docker_cpu_use'

addon conf:

1 Like