Home Assistant Community Add-on: Glances

yes, that is the address

I must have something configured wrong on my ubuntu install

Sure.

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

I also disabled protection mode in the settings on top of the add-on

I’m running a NUC and getting the same message and the 502 bad gateway error.

I tried making changes several times last night on my laptop HA instance. Rebooting between changes and uninstalling/reinstalling every time. Never could get it to work. Works fine with default settings on my RPI.

I can open Glances via the Web UI but not via the panel_iframe. It shows up in the panel but when I click on Glances it just shows a white screen. I’m using the exact same URL in the panel_iframe config as the Web UI. Am I missing something here?

I’m at work so sorry if there’s another thread on this but ever since the 0.88 upgrade, my Glance sensors aren’t working at all. Glances is working fine but the sensors always fail. I didn’t see a breaking change related to them. I always push all breaking changes through a GitHub branch of my own config repo so I go through them with a fine-toothed comb.

I get the same error message too.

NotImplementedError: couldn't find /proc/1/io (kernel too old?)

I’m running an Asus Tinkerboard S with Hassio, HassOS 2.9, Home Assistant 0.87.1. I thought it issues was with me using a Tinkerboard instead of an rPI.

It was working for me using tinker board with hassos 2.6, upgrading to 2.9 broke it. 2.10 is also a no go.

:tada: Release v0.2.0

Full Changelog

This release reduces the default CPU usage by the add-on significantly (75-90%!).

It now disables (the CPU intensive) process information by default but can be enabled again in the add-on options. Also added the possibility for a custom refresh interval, which defaults to 10 seconds.

Changed

  • Upgrades add-on base image to 2.3.2
  • Adds support for disabling process info
  • Adds support for setting a custom refresh interval
  • Removed a lorem ipsum leftover

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

I’ve catch a strange bug with this plugin.
The Glances correctly work on server.lan:61208 (i can see it report via browser), but this plugin can’t access to data.
Into logs are errors like this:

2019/03/01 01:36:19 [info] 25827#25827: *339 client sent invalid method while reading client request line, client: 127.0.0.1, server: _, request: "�pP*�)���-O(O��MT޼-�캨�׬�a a7��Fn�Se�����5]�S�����l9L>�,�0�̨̩̪�+�/��$�(k�#�'g�"
127.0.0.1 - - [01/Mar/2019:01:36:19 +0300] "\x16\x03\x01\x02\x00\x01\x00\x01\xFC\x03\x03pP*\x8A)\xEA\xCA\xD6-O\x12(O\xE8\x04\xE2\x95\x1CMT\xDE\xBC-\xE2\xEC\xBA\xA8\xB0\xD7\xAC\xCF\x07 a7\xF1\xD9Fn\xCCS\x1B\x1C\x9F\xFB\xF4\xEF\xBE\xFC5]\xEB\xACS\x1F\x86\xF1\xD2\x1C\x90\x86\x10l9L\x00>\x13\x02\x13\x03\x13\x01\xC0,\xC00\x00\x9F\xCC\xA9\xCC\xA8\xCC\xAA\xC0+\xC0/\x00\x9E\xC0$\xC0(\x00k\xC0#\xC0'\x00g\xC0" 400 173 "-" "-"

Glances config (default):

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

Glances sensor config:

  - platform: glances
    name: "HAss"
#    host: localhost
    username: !secret glances_username
    password: !secret glances_password
    version: 3
    resources:
      - 'disk_use_percent'
      - 'memory_use_percent'
      - 'swap_use_percent'
      - 'processor_load'
      - 'docker_active'
      - 'docker_cpu_use'

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