Home Assistant Community Add-on: Glances

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

I used the localhost IP for my config. This is what i have within sensors.yaml

  - platform: glances
    host: 127.0.0.1
    username: login
    password: password
    version: 3
    resources:
      - 'processor_load'
      - 'memory_use_percent'
      - 'disk_use_percent'
      - 'cpu_temp'

1 Like

Thanks all, for the recent conversation . Finally after many attempts, Glances is now performing as a sensor.

As per suggestions, I had to specify the localhost ip address 127.0.0.1, specify the port 61208 on both the Addon config screen and within the sensor configuration.

A restart of HA , and the sensors appeared as entities, to be used on the UI and to populate InfluxDB

1 Like

I have gotten a bit further now! The only thing left seems to be that it gives me a 400 error now in the addon (same in MotionEye where I’m trying to get the camera still images), so it seems I am doing something wrong in the request, but at least I have a connectiong going on. I have put in my username in Home assistant and the password I use to login.
EDIT: Alright, got it now. What made the difference for me was setting ssl to true in the sensor config, but verify_ssl: false.

1 Like

:tada: Release v0.4.1

Full Changelog

:sparkles: This release adds support for the “Add to sidebar” feature that became available in Home Assistant 0.92.

Please note: You need to have Home Assistant 0.92 or newer to be able to install this update.

:hammer: Changes

  • :arrow_up: Updates Home Assistant requirement to 0.92.0b2
  • :sparkles: Adds support for showing in sidebar
  • :books: Removes obsolete iframe URL section from README

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

1 Like

Don’t forget to enable the influxdb" in your Hass.io add-on config. I changed that, and now it works.

:tada: Release v0.5.0

Full Changelog

Major upgrade, but should not contain any breaking changes.

:hammer: Changes

  • :arrow_up: Updates zeroconf to v0.22.0 (#14)
  • :arrow_up: Updates psutil to v5.6.2 (#13)
  • :arrow_up: Upgrades lua-resty-http to 0.13-r0
  • :fire: Removal of old configs
  • :ambulance: Turns of Lua Resty core in Nginx
  • :arrow_up: Updates requests to v2.22.0 (#16)
  • :arrow_up: Updates docker to v3.7.3 (#21)
  • :pencil2: Maintaince -> Maintenance
  • :arrow_up: Upgrades add-on base to default image at v4.0.1
  • :arrow_up: Upgrades linux-headers to 4.19.36-r0
  • :arrow_up: Upgrades musl-dev to 1.1.22-r2
  • :arrow_up: Upgrades nginx to 1.16.0-r2
  • :sparkles: Adds Alpine Python 3.7.3
  • :sparkles: Adds Hass.io wheels
  • :fire: Removes now deprecated ssl directive
  • :arrow_up: Updates psutil to v5.6.3 (#20)
  • :arrow_up: Updates zeroconf to v0.23.0 (#19)
  • :arrow_up: Updates docker to v4 (#17)
  • :arrow_up: Updates bottle to v0.12.17 (#22)

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

:tada: Release v0.5.1

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v4.0.2
  • :arrow_up: Updates glances to v3.1.1 (#24)
  • :racehorse: Improves build speed by leveraging the Home Assistant Wheels server

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

:tada: Release v0.5.2

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :ambulance: Add https/http for InfluxDB fixes #25 (#26)

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

:tada: Release v0.5.3

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v4.0.3
  • :arrow_up: Upgrades musl-dev to 1.1.22-r3

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