Giter Club home page Giter Club logo

addon-glances's Introduction

Home Assistant Community Add-on: Glances

GitHub Release Project Stage License

Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

Github Actions Project Maintenance GitHub Activity

Discord Community Forum

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

Glances is a cross-platform system monitoring tool written in Python.

The Glances Hass.io add-on

About

Glances is a cross-platform monitoring tool which aims to present a maximum of information in a minimum of space through a Web-based interface.

Glances can export all system statistics to InfluxDB, allowing you to look at all your system information and its behavior over time.

๐Ÿ“š Read the full add-on documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! ๐Ÿ˜

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant add-ons for you

Want some more functionality to your Home Assistant instance?

We have created multiple add-ons for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2019-2024 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon-glances's People

Contributors

chpego avatar dependabot[bot] avatar ferrix avatar frenck avatar heytcass avatar ionutneagu avatar kamontat avatar renovate[bot] avatar saltyautomation avatar sinclairpaul avatar tjorim avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

addon-glances's Issues

Following instructions on glances github page to add glances as sensor appears not supporte

Following instructions on glances Github page to add glances as sensor appears not supported
I get the following error message:

The glances platform for the sensor integration does not support platform setup. Please remove it from your config

Expected behavior

I expect to see a glances sensor/entity appearing in home assistance

Actual behavior

The glances platform for the sensor integration does not support platform setup. Please remove it from your config

Steps to reproduce

I installed the glances add on with the following configuration:

log_level: info
process_info: false
refresh_time: 60
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

In the configuration.yaml I added the following entry:

sensor:
  - platform: glances
    host: 127.0.0.1
    port: 61209
    version: 3
    resources:
      - 'disk_use_percent'
      - 'memory_use_percent'
      - 'processor_load'
      - 'process_running'
      - 'cpu_use_percent'
      - 'cpu_temp'
      - 'docker_active'
      - 'docker_cpu_use'
      - 'docker_memory_use'

I am running this on a raspberrypi4 with raspbian and hassio installed via docker ce.

memory leak in glances container

Problem/Motivation

When running glances add-on with influxdb configured, the glances container continous to grow in memory consumption. 280MB to 600MB in two days.

Memory consumption. Note the sharp drops were hass (hassio) restarts.
image

From within container:
image

Expected behavior

Memory hits a stable state.

Actual behavior

Memory consumption continues to climb.

Steps to reproduce

Using HA v0.107.7, configure glances plugin v0.7.1 as follows and wait a day or two to watch memory climb.

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

Proposed changes

none

Which hostname/IP address to use when setting up Glances

Problem/Motivation

Using latest Hass.io and add-glances versions.
Set up the integration through Configuration -> Integrations -> Glances
I used localhost, 127.0.0.1, the name of the container and all failed to connect

Expected behavior

Set up the integration through Configuration -> Integrations -> Glances using localhost as hostname should successfully connect

Actual behavior

Integration setup fails with error "Unable to connect to host"

Set up the integration through Configuration -> Integrations -> Glances
Accept the default values and click on submit

Proposed changes

Using Portainer there's no ports being exposed for addon-glances container so not not sure if port 61208 externally is accessible. This may be the root of the problem

No export to influxDB after previous fix

Problem/Motivation
See previous issue #296 (comment)
and previous fix #299
No change same error

The export to influxDB no longer works.

Expected behavior

The export works without issues.
Actual behavior

No data are in the relevant influxDB DB.

module 'six' is not installed (I have checked in the container).

2022-11-17 19_36_05-

Add-on: Glances
A cross-platform system monitoring tool
Add-on version: 0.17.1
You are running the latest version of this add-on.
System: Home Assistant OS 9.3 (amd64 / generic-x86-64)
Home Assistant Core: 2022.11.3
Home Assistant Supervisor: 2022.10.2
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

INFO: Starting Glances...
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...
Traceback (most recent call last):
File "/usr/bin/glances", line 8, in
sys.exit(main())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 179, in main
start(config=core.get_config(), args=core.get_args())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 108, in start
mode = GlancesMode(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/standalone.py", line 45, in init
self.stats = GlancesStats(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 39, in init
self.load_modules(self.args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 90, in load_modules
self.load_exports(args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 162, in load_exports
export_module = import(self._exports_all[export_name])
File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 18, in
from influxdb import InfluxDBClient
File "/usr/lib/python3.10/site-packages/influxdb/init.py", line 9, in
from .client import InfluxDBClient
File "/usr/lib/python3.10/site-packages/influxdb/client.py", line 23, in
from six.moves.urllib.parse import urlparse
ModuleNotFoundError: No module named 'six'

Steps to reproduce

Setup influxDB in Glances.

Unknown options warnings in supervisor

Problem/Motivation

when I start docker logs --follow hassio_supervisor I notice some WARNING logs coming from glances.

23-03-23 15:27:27 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-23 15:27:27 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-23 15:27:27 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-23 15:27:27 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)

image

the latest glances is installed on my system (0.18.0) and it is working as normal

Expected behavior

no effect in homeassistant noticable, expect not to see any warning logs in supervisor

Actual behavior

no effect in homeassistant noticable

Steps to reproduce

see screenshot above.

Proposed changes

is there something I need to do on my installation or should this be fixed with an update of the addon?
I tried to remove the specific option lines in the configuration "edit in yaml" option, but when I click save these options re-appear.

Glances Influx export does not survive a host reboot

Problem/Motivation

I use Glances on Homeassistant to send server stats to an InfluxDB bucket, so that I can plot things out using Grafana.

Problem is, it seems that the Influx export component does not survive a host reboot. After I reboot the host, and I restart the container, only then do I start to see stats show up again.

See below screenshot. The aread where the lines is linear is after a host reboot:
image

Expected behavior

  • I would expect Glances to run in the background, always updating to Influx.
  • I expect Glances to start on boot, and continue running always.
  • I expect Glances influx export to survive a host reboot.

Actual behavior

  • Glances influx export does not start on boot it seems, and therefore it's not reporting until I restart the container and start the webui
  • When I restart the container and launch the web-ui, then I get data reported in Grafana.

Steps to reproduce

  1. Install Glances and set up to report to Influx/Grafana
  2. Launch the webui, and confirm that stats are now showing up in Grafana.
  3. Reboot the Homeassistant host (not just Homeassistant itself, it appears that docker container addons keep running in this instance)
  4. Notice how the reporting stops in Grafana

Proposed changes

  • Possibly we need a "server-only" mode, that does not create the webui, but only reports to Influx in the background. This might help save resources on something that runs constantly in the backround?

Glances no longer writes to influxDB

Problem/Motivation

I noticed after updating hassio and all add-ons that glances is no longer writing to InfluxDB.

Expected behavior

Data continuing to be written to the database

Actual behavior

On startup of the Glances add-on in hassio, I get the following alert:
INFO: Starting Glances...
INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
Traceback (most recent call last):
File "/usr/bin/glances", line 11, in
load_entry_point('Glances==3.1.1', 'console_scripts', 'glances')()
File "/usr/lib/python3.7/site-packages/glances/init.py", line 140, in main
start(config=config, args=args)
File "/usr/lib/python3.7/site-packages/glances/init.py", line 106, in start
mode = GlancesMode(config=config, args=args)
File "/usr/lib/python3.7/site-packages/glances/standalone.py", line 49, in init
self.stats = GlancesStats(config=config, args=args)
File "/usr/lib/python3.7/site-packages/glances/stats.py", line 47, in init
self.load_modules(self.args)
File "/usr/lib/python3.7/site-packages/glances/stats.py", line 101, in load_modules
self.load_exports(args=args)
File "/usr/lib/python3.7/site-packages/glances/stats.py", line 179, in load_exports
config=self.config)
File "/usr/lib/python3.7/site-packages/glances/exports/glances_influxdb.py", line 60, in init
self.client = self.init()
File "/usr/lib/python3.7/site-packages/glances/exports/glances_influxdb.py", line 70, in init
ssl=(self.protocol.lower() == 'https'),
AttributeError: 'NoneType' object has no attribute 'lower'

This is Glances version 0.5.1 on Hassio version 0.96.4. I am writing to databases via other add-ons as well, those are not broken.

Steps to reproduce

Start Hassio, start Glances

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

GitHub
OpenResty's Branch of LuaJIT 2. Contribute to openresty/luajit2 development by creating an account on GitHub.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
glances/Dockerfile
  • ghcr.io/hassio-addons/base 15.0.8
github-actions
.github/workflows/ci.yaml
.github/workflows/deploy.yaml
.github/workflows/labels.yaml
.github/workflows/lock.yaml
.github/workflows/pr-labels.yaml
.github/workflows/release-drafter.yaml
.github/workflows/stale.yaml
pip_requirements
glances/requirements.txt
  • bottle ==0.12.25
  • docker ==7.0.0
  • glances ==3.4.0.5
  • influxdb ==5.3.2
  • influxdb-client ==1.42.0
  • netifaces ==0.11.0
  • paho-mqtt ==1.6.1
  • psutil ==5.9.8
  • py-cpuinfo ==9.0.0
  • requests ==2.31.0
  • scandir ==1.10.0
  • zeroconf ==0.132.2
regex
glances/Dockerfile
  • ghcr.io/hassio-addons/base 15.0.8
glances/build.yaml
  • ghcr.io/hassio-addons/base 15.0.8
  • ghcr.io/hassio-addons/base 15.0.8
  • ghcr.io/hassio-addons/base 15.0.8
glances/Dockerfile
  • alpine_3_19/build-base 0.5-r3
  • alpine_3_19/py3-pip 23.3.1-r0
  • alpine_3_19/python3-dev 3.11.9-r0
  • alpine_3_19/nginx 1.24.0-r15
  • alpine_3_19/py3-packaging 23.2-r0
  • alpine_3_19/py3-six 1.16.0-r8
  • alpine_3_19/python3 3.11.9-r0

  • Check this box to trigger a request for Renovate to run again on this repository

Certain special characters in influxDB password will cause an error

Problem/Motivation

Found a stack trace error and no data was added to influxDB when setting a randomly generated password influxDB user password for this addon that contained a % character. Unfortunately I neglected to capture the error or the password because I didn't think about filing this bug until after I had fixed the issue.

Expected behavior

Some other descriptive error that indicated that the password contained invalid or unacceptable characters, or at least something in the documentation explaining which characters are allowed.

Actual behavior

Stack trace error in logs and no data flowing to influxDB

Steps to reproduce

Setup a user for glances in influxDB with a password containing a % character then configure glances addon to use that account. Start glances and wait for it to start attempting to send data to influxDB

Proposed changes

Some quick blurb in the documentation about which characters are permitted in passwords at the least. Possible catching of the exception and cleaner logging would also be nice.

Issue with influxdb2 after update to 0.18.0

Problem/Motivation

Running HAOS on an Odroid N2+. Just updated to Glances 0.18 with support for for influxdb2.

I have filled in information for influxdb2 (has waited for this :-D )

I am getting this error in the log:


Add-on: Glances
A cross-platform system monitoring tool

Add-on version: 0.18.0
You are running the latest version of this add-on.
System: Home Assistant OS 9.5 (aarch64 / odroid-n2)
Home Assistant Core: 2023.3.4
Home Assistant Supervisor: 2023.03.1

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

INFO: Starting Glances...
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...
Traceback (most recent call last):
File "/usr/bin/glances", line 8, in
sys.exit(main())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 179, in main
start(config=core.get_config(), args=core.get_args())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 108, in start
mode = GlancesMode(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/standalone.py", line 45, in init
self.stats = GlancesStats(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 39, in init
self.load_modules(self.args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 90, in load_modules
self.load_exports(args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 167, in load_exports
self._exports[export_name] = export_module.Export(args=args, config=self.config)
File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 51, in init
self.client = self.init()
File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 65, in init
db = InfluxDBClient(
File "/usr/lib/python3.10/site-packages/influxdb/client.py", line 115, in init
self.__port = int(port)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

My yaml conf:
log_level: info
process_info: false
refresh_time: 10
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
influxdb:
enabled: true
host: 192.168.50.182
port: 8086
interval: 30
ssl: false
version: 2
username: user
password: pass
database: data
prefix: Odroid
token: "!secret myinfluxdb2token"
bucket: Glances
org: Home

Expected behavior

I expected that it would send data to influxdb2

Actual behavior

Glances gui is running - but no data to influxdb2

Steps to reproduce

install 0.18.0 and fill out information for version: 2

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Improvement : Ability to change the path to the configuration file glances.conf

Problem/Motivation

(Why the issue was filed)
We need a way to change the location of the configuration file
/config/glances/glances.conf seems to be hard-coded

Expected behavior

(What you expected to happen)
An input field in the configuration UI (as with most of addons)

Actual behavior

(What actually happened)
No way to change the path

Steps to reproduce

(How can someone else make/see it happen)
N/A or go to the configuration UI
file goes to /config/glances/glances.conf

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Many HA addons have this field available in the addon configuration UI, that seems a quite "standard" feature for addons configuration.

Glances Addon fails to start

Problem/Motivation

The addon doesn't start.

Expected behavior

It starts

Actual behavior

It doesn't start, I get the following log output:

INFO: Starting Glances...
Traceback (most recent call last):
  File "/usr/local/bin/glances", line 11, in <module>
    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 <listcomp>
    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'

It keeps attempting to start and showing this error in a loop until manually stopped.

Steps to reproduce

The addon does this every time I restart it. I've uninstalled it and reinstalled to no effect.

Credentials for sensor?

Problem/Motivation

When adding the sensor in Home Assistant, it is not clear what "YOUR_GLANCES_USERNAME" and "YOUR_GLANCES_PASSWORD" are supposed to be.

Expected behavior

Description that Home Assistant credentials are to be used, or where to set other credentials if needed.

Actual behavior

Not stated.

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

Add a line to the description how to add a sensor which mentions that Home Assistant credentials are used would be useful.
I created a new user for this, not sure if that is needed/useful - but it keeps me from entering my main user password in the secrets.yaml file.

Glances 501 Message: Unsupported method ('GET')

When opening the glances addon I get a Message: Unsupported method ('GET').

Environment

  • Add-on with the issue: glances
  • Add-on release with the issue: 0.9.1
  • Last working add-on release (if known): Unknown
  • Operating environment (OS/Supervised): Supervised

Problem-relevant configuration

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

Traceback/Error logs

nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
[13/Dec/2020:16:20:53 +0000] 501 127.0.0.1, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36)
Glances Web User Interface started on http://127.0.0.1:61209/
Traceback (most recent call last):
  File "/usr/bin/glances", line 11, in <module>
    load_entry_point('Glances==3.1.5', 'console_scripts', 'glances')()
  File "/usr/lib/python3.8/site-packages/glances/__init__.py", line 143, in main
    start(config=config, args=args)
  File "/usr/lib/python3.8/site-packages/glances/__init__.py", line 112, in start
    mode.serve_forever()
  File "/usr/lib/python3.8/site-packages/glances/webserver.py", line 48, in serve_forever
    self.web.start(self.stats)
  File "/usr/lib/python3.8/site-packages/glances/outputs/glances_bottle.py", line 216, in start
    self._app.run(host=self.args.bind_address,
  File "/usr/bin/bottle.py", line 761, in run
    run(self, **kwargs)
  File "/usr/bin/bottle.py", line 3137, in run
    server.run(app)
  File "/usr/bin/bottle.py", line 2789, in run
    srv = make_server(self.host, self.port, app, server_cls, handler_cls)
  File "/usr/lib/python3.8/wsgiref/simple_server.py", line 154, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3.8/wsgiref/simple_server.py", line 50, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib/python3.8/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address in use
[13/Dec/2020:16:21:43 +0000] 501 192.168.10.23, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36)

Additional information

The error message suggests glances is trying to use a port that's already in use. However, it's in its own docker container with no ports allocated so I'm unsure how that is possible

coretemp misvalue

Problem/Motivation

core temp misvalue

Expected behavior

correct cire temp

Actual behavior

(What actually happened)

core temp says 100ยฐ, actual it is 72

(How can someone else make/see it happen)

Webui doesn't load

Problem/Motivation

Glances addon won't load from the sidebar or webui.

Expected behavior

The sidebar view or the webui to show the glances interface.

Actual behavior

A loading screen in the sidebar and the glances UI never loads:
image

After waiting on this screen for several minutes, the display shows a 502: Bad Gateway error
image

Here's my config:

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

And here's the logs from the addon (they don't seem to show any errors):

[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
 A cross-platform system monitoring tool
-----------------------------------------------------------
 Add-on version: 0.5.5
 You are running the latest version of this add-on.
 System: Ubuntu 18.04.3 LTS  (amd64 / qemux86-64)
 Home Assistant version: 0.101.3
 Supervisor version: 192
-----------------------------------------------------------
 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 DEBUG
[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... 
DEBUG: Requested API resource: http://hassio/dns/info
DEBUG: Request method: GET
DEBUG: Request data: {}
DEBUG: API HTTP Response code: 200
DEBUG: API Response: {"result": "ok", "data": {"version": "1", "latest_version": "1", "host": "172.30.32.3", "servers": ["dns://8.8.8.8", "dns://1.1.1.1"], "locals": []}}

[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting Glances...
INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)

If I access glances in a webbrowser (my_local_hass_ip:61208) everything loads fine. I also have glances connected to InfluxDB and data is correctly being exported there as well.

Time offset issue in containers uptime?

Problem/Motivation

When I restart Home Assistant (or when I just restart 1 container) the uptime starts at 2hrs. Probably because I am at a GMT+2 timezone.

Expected behavior

Uptime starts at 0:00

Actual behavior

Uptime starts at 2:00

Steps to reproduce

Restart HASS on a system with a non-GMT timezone and start Glances

Proposed changes

Probably thereโ€™s a starttime-now where one of them has a wrong timezone. Please fix.

Bad Gateway

Problem/Motivation

Despite the addon starts, page doesn't show

Expected behavior

Show something after clicking the Glances button of the sidebar

Actual behavior

There's a single line saying 502 Bad Gateway

Steps to reproduce

I just installed the addon, started and tried to access
There's no error under the "Log" page of HomeAssistant (don't know if it's supposed to appear here)

Proposed changes

Help?

glances now fails to start after working well for some time

Problem/Motivation

glances fails to start

Expected behavior

glances starts

Actual behavior

glances attempts to start but fails ....this is the relevant entries in log:

19-09-11 01:21:01 WARNING (SyncWorker_9) [hassio.docker.addon] Glances run with disabled protected mode! 19-09-11 01:21:01 INFO (SyncWorker_9) [hassio.docker.interface] Clean addon_a0d7b954_glances application 19-09-11 01:21:38 INFO (SyncWorker_17) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-samba with version 8.1 19-09-11 01:21:38 ERROR (SyncWorker_9) [hassio.docker] Can't start addon_a0d7b954_glances: 500 Server Error: Internal Server Error ("OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/var/run/docker.sock\\\" to rootfs \\\"/mnt/data/docker/overlay2/688809efc974efb562c49b857c3d887b20348c3447184cb2d80f0ec62784bf23/merged\\\" at \\\"/var/run/docker.sock\\\" caused \\\"lstat /mnt/data/docker/overlay2/688809efc974efb562c49b857c3d887b20348c3447184cb2d80f0ec62784bf23/merged/var: bad message\\\"\"": unknown") 19-09-11 01:21:40 INFO (SyncWorker_18) [hassio.docker.addon] Start Docker add-on hassioaddons/influxdb-armv7 with version 3.2.1 19-09-11 01:21:40 INFO (SyncWorker_4) [hassio.docker.addon] Start Docker add-on hassioaddons/grafana-armv7 with version 2.2.5 19-09-11 01:21:40 INFO (SyncWorker_15) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-ssh with version 6.3 19-09-11 01:21:41 INFO (SyncWorker_11) [hassio.docker.addon] Start Docker add-on hassioaddons/unifi-armv7 with version 0.12.0 19-09-11 01:21:41 ERROR (MainThread) [asyncio] Task exception was never retrieved future: <Task finished coro=<Addon.start() done, defined at /usr/src/hassio/hassio/addons/addon.py:457> exception=AddonsError()> Traceback (most recent call last): File "/usr/src/hassio/hassio/addons/addon.py", line 478, in start raise AddonsError() from None hassio.exceptions.AddonsError

Steps to reproduce

I setup glances with influx. glance in sidebar worked fine. data in influx and plotted in grafana fine. Just noticed (2 or three updates have occured since I checked glances) glances not running and cannot be started from hassio add on page.

Proposed changes

get glances to start

Request: use other database than influx on RPI-3

Rather than using the influx database I prefer the use of an external MariaDB. I'm running HA on a RPI-3 and try to prevent to many read/writes on the SDcard. In the readme file there is only the example to use the influx DB.

Unable to download Glances from Add On

Problem/Motivation

I receive an error when I try to download Glances through the Add On store.

Expected behavior

Previous experience just installed glances.

Actual behavior

Received the following error:

Failed to install add-on
Can't install ghcr.io/hassio-addons/glances/aarch64:0.16.0: 404 Client Error for http+docker://localhost/v1.41/images/ghcr.io/hassio-addons/glances/aarch64:0.16.0/json: Not Found ("no such image: ghcr.io/hassio-addons/glances/aarch64:0.16.0: No such image: ghcr.io/hassio-addons/glances/aarch64:0.16.0")

Steps to reproduce

Try to download directly from Add On store.

Proposed changes

No proposed fix.

cannot read api/3/cpu load since yesterday 7pm gmt

I use this in configuration.yaml and without any change it stopped working yesterday at about 7pm GMT

  • platform: rest
    resource: http://192.168.1.20:8082/api/3/cpu
    username: ****
    password: ********
    name: CPU usage
    value_template: '{{ value_json.total}}'
    unit_of_measurement: "%"

if I enter manualy:
http://192.168.1.20:8082/api/3/cpu
I get asked for username and password wich never work (hassio username and password)
and get error message : 401 Access Denied

Endpoint with name already exists in network host

Problem/Motivation

The addon don't start in my setup. Raspberry Pi 3B+ with the current version of Hass.io. After loading the addon the following error appears in the system log of Hass.io

19-09-25 19:04:40 ERROR (SyncWorker_13) [hassio.docker] Can't start addon_a0d7b954_glances: 403 Client Error: Forbidden ("endpoint with name addon_a0d7b954_glances already exists in network host")

Expected behavior

The addon should start without this error. Uninstall and reload of the addon don't resolve this issue.

Actual behavior

The addon don't show logs. The only error is shown in the system log.

Steps to reproduce

I have no idea how this behavior came up. I hope you'll have a idea to debug this error.

Impossibly high CPU usage

Problem/Motivation

The glances addon, cpu usage was more than %100 percent all the time.

image

I don't know if this behavior is the result but the glances integration in HA was almost impossible to add. Failed to connect almost everytime. When it connected, the sensors were mostly unavailable.
image

Expected behavior

Should not happen.

Actual behavior

No idea

Steps to reproduce

I did start a new HA installation. One of the first addons, I installed was Glances. So there is almost no integration or sensor setup. Only a couple of addons.

Home Assistant OS 5.11 64-bit
core-2021.2.3

Raspberry pi 4b 8gb
Overclocked with
over_voltage=6
arm_freq=2000

Just guessing but overclocking might be affecting the base values so it is showing more than 100 percent?

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Glances Entities Not updating

My Glances Entities are not updating and and show as unavailable. It has been working and started to do it intermittently but now its this way 100%. Any ideas of what could cause this?

Thank you!

Glances fails to start due to `bad light userdata pointer`

Problem/Motivation

Trying to install and run glances and it fails.

Expected behavior

Glances runs and I get to see stats of my system.

Actual behavior

Add on fails to start
PANIC: unprotected error in call to Lua API (bad light userdata pointer)

Steps to reproduce

Clean install of Hassio on Odroid C1, download Glances Add-on, try and start it.

Proposed changes

I suspect my issue is the same issue impacting a number of add-ons, related to using the aarch64 architecture (the only option I'm aware of on an Odroid C1). I hope the same fix that has been done for other add-ons (e.g. Node Red) can be applied to this, time permitting, so it can work. I see the readme says Supports aarch64 Architecture, so I hope it is a temporary glitch.

question - security rating 1 out of 6

I was looking to install this add-on, and noticed that it has a rating of 1 (out of 6), where 1 is the most insecure and highest risk. Is this rating correct, am I missing something? Wanting to confirm before I install.

loop keyword deprecated and will fail in Home Assistant after 2022.2

Problem/Motivation

According to the log file the used loop-keyword is deprecated and will fail in HA after version 2022.2

Expected behavior

No Warning-message in the logfile

Actual behavior

Warning message in the Home Assistant (2021.12) log:

Detected integration that called async_timeout.timeout with loop keyword argument. The loop keyword argument is deprecated and calls will fail after Home Assistant 2022.2. **Please report issue for glances using this method at homeassistant/components/glances/__init__.py, line 125: await self.api.get_data()**
(Source: helpers/frame.py:103

Steps to reproduce

Fresh install Glances

Proposed changes

Glances Unknown option warning in system logs when starting Homeassistant.

Problem/Motivation

Receiving the following error when starting HomeAssistant in both my work and home environments:

23-03-25 14:40:51 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/glances/amd64 with version 0.18.0
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)

(Why the issue was filed)
Wanted to fix the reported error. To confirm that it is not just a visual warning with no action needed.

Expected behavior

No error messages..

Actual behavior

23-03-25 14:40:51 INFO (SyncWorker_11) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/glances/amd64 with version 0.18.0
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-25 14:40:51 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)

Steps to reproduce

Start homeassistant.

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

I have tried uninstalling, rebooting and reinstalling. Error still occurs.

I am on the latest version of Homeassistant and glances.

Trouble with long link info in GUI

long-link

Problem/Motivation

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

CPU Temp

Problem/Motivation

i dont see CPU temp at all.

Expected behavior

i Would like to see CPU Temp

Actual behavior

No CPU Temp

Steps to reproduce

Dont know

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

history_size remains to 28800

Problem/Motivation

Hi,

Like describe here: #61 I also see memory leaks.

Then I update the addon from v0.7.1 to v0.8.0 to take advantage of this correction:
302a49a

Expected behavior

In /etc/glances.conf I expect the value for history_size to be 0

Actual behavior

but it remains to 28800

Steps to reproduce

Update from from v0.7.1 to v0.8.0

Proposed changes

For the moment as a workaround I manually update /config/glances/glances.conf to include this change and keep it through the addon restart.

No cpu temp on Intel NUC

Problem/Motivation

Missing sensor

Expected behavior

Sensor to be present

Actual behavior

No sensors for temperature appear

Steps to reproduce

Install on Intel NUC, start add-on

Proposed changes

From the glances docs, it appears that lmsensors should be installed on OS and then the sensors would be available

Missing /boot for disk size

Hi All,

In running HA in docker on a Debian 64Bit on a RPi4.
Everything is working perfect in Glances AddOn.

Only thing i missing is /boot

How can i correct this?

Enable SMART monitor sensors?

#Add SMART monitoring to Glances integration

Glances provides a tremendous amount of data from a server, including recently roosting on the status of hard drives from SMART monitoring. This monitoring is crucial for getting signs that a drive is about to fail, and can be used to avoid catastrophic data losses at the worst, or signicant downtime at the least.

However, the HA integration does not provide this sensor as an entity, at least according to the docs or the list of available entities in my integration. Adding the sensor would be natural for home automation, especially if you have a data or media server.

Expected behavior

SMART sensors in Glances integration

Actual behavior

not implemented

Steps to reproduce

Enable SMART monitoring on your instance of glances using the '--enable-plugin smart' when running. Check the entities available in the glances integration of home assistant.

Proposed changes

Add the sensor

InfluxDB 2 export no longer functions after upgrading to v0.19.0

Problem/Motivation

Just upgraded to version 0.19.0 and InfluxDB2 export doesn't appear to be working.

Expected behavior

InfluxDB2 export continue to work.

Actual behavior

No data is being exported to InfluxDB2.

Here is my log:

-----------------------------------------------------------
 Add-on: Glances
 A cross-platform system monitoring tool
-----------------------------------------------------------
 Add-on version: 0.19.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.1  (aarch64 / yellow)
 Home Assistant Core: 2023.5.3
 Home Assistant Supervisor: 2023.04.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...
Traceback (most recent call last):
  File "/usr/bin/glances", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/glances/__init__.py", line 180, in main
    start(config=core.get_config(), args=core.get_args())
  File "/usr/lib/python3.11/site-packages/glances/__init__.py", line 108, in start
    mode = GlancesMode(config=config, args=args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/glances/standalone.py", line 44, in __init__
    self.stats = GlancesStats(config=config, args=args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/glances/stats.py", line 39, in __init__
    self.load_modules(self.args)
  File "/usr/lib/python3.11/site-packages/glances/stats.py", line 90, in load_modules
    self.load_exports(args=args)
  File "/usr/lib/python3.11/site-packages/glances/stats.py", line 167, in load_exports
    self._exports[export_name] = export_module.Export(args=args, config=self.config)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/glances/exports/glances_influxdb2.py", line 52, in __init__
    self.interval = int(self.interval)
                    ^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Steps to reproduce

Upgrade to v0.19.0 and attempt to use InfluxDB2.

Update is no longer compatible with your system: v0.3.0 to v0.4.0

I am running Glances on Ubuntu 18.04.2 LTS within Oracle VM VirtualBox - on Win10-64bit
Had 0.3.0 running now 0.4.0 refuses to update - with "This update is no longer compatible with your system." What do i need to do get this update or is it true it can't be run on my installation?

image

No export to influxDB

Problem/Motivation

The export to influxDB no longer works.

Expected behavior

The export works without issues.

Actual behavior

No data are in the relevant influxDB DB.

The following error stack is visible in Glances:
INFO: Starting Glances...
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...
Traceback (most recent call last):
File "/usr/bin/glances", line 8, in
sys.exit(main())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 179, in main
start(config=core.get_config(), args=core.get_args())
File "/usr/lib/python3.10/site-packages/glances/init.py", line 108, in start
mode = GlancesMode(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/standalone.py", line 45, in init
self.stats = GlancesStats(config=config, args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 39, in init
self.load_modules(self.args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 90, in load_modules
self.load_exports(args=args)
File "/usr/lib/python3.10/site-packages/glances/stats.py", line 162, in load_exports
export_module = import(self._exports_all[export_name])
File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 18, in
from influxdb import InfluxDBClient
File "/usr/lib/python3.10/site-packages/influxdb/init.py", line 9, in
from .client import InfluxDBClient
File "/usr/lib/python3.10/site-packages/influxdb/client.py", line 23, in
from six.moves.urllib.parse import urlparse
ModuleNotFoundError: No module named 'six'

Steps to reproduce

Setup influxDB in Glances.

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Unable to set an empty prefix for InfluxDB

Problem/Motivation

InfluxDB Prefix is required in the configuration, but I want to leave it empty.

Expected behavior

When saving the config with no prefix defined for the InfluxDB section, the config is accepted and data is sent through to Influx with no prefix attached.

Actual behavior

Saving the config is blocked and I can't continue without defining a prefix.

Error message is:
Failed to save add-on configuration, Missing option 'prefix' in influxdb in Glances

Steps to reproduce

  1. Open up glances configuration in HA Supervisor
  2. Delete the prefix directive in the influxdb section.
  3. Witness the saving of the config failing.

Proposed changes

The latest version of the Glances Grafana Dashboard template defines all the stats without a prefix, and rather makes use of a hostname variable in the dashboard itself. I think the idea is that multiple instances of Glances can write to the same db in InfluxDB, and then in Grafana the user can switch between the hosts in the UI.

Therefore it will be great to be able to save the add-on config to not add a prefix to the stats, so that this Dashboard template in Grafana can work correctly.

Container Section missing after update to 0.17.0

Problem/Motivation

The container section is missing and the HA sensor for container count is unavailable after update to 17. Restoring to previous, it comes back.

Expected behavior

Looking at the release notes, I don't think this was intended.

System Info

System: Debian GNU/Linux 11 (bullseye) (amd64 / qemux86-64)
Home Assistant Core: 2022.11.2
Home Assistant Supervisor: 2022.10.2

Request to apply refresh_time to influxdb glances instance as well as web instance

Problem/Motivation

The recently committed (and greatly appreciated) "refresh_time" option in the addon config correctly sets the --time option for the web server instance of glances.

Currently it is not possible to set the refresh time for the influxdb glances instance. I propose a mechanism be provided to also set the refresh time on the influxdb glances instance.

The principal impact is that this can create unnecessarily high load on hassio and influxdb instances.

Expected behavior

I expected the "refresh_time" option would be applied to both glances instances.

Actual behavior

The refresh_time option was applied only to the web server glances instance.

Steps to reproduce

Set refresh_time option to something other than 3 (seconds) and restart the addon.

The measurements will continue to be reported to influxdb at 3 second intervals.
Also - the influxdb glance instance in the addon_glances container will be spawned without the --time option.

Proposed changes

I propose that:
a) The refresh_time option be also applied to the influxdb instance by a one-line patch to https://github.com/hassio-addons/addon-glances/blob/master/glances/rootfs/etc/services.d/influxdb/run:
options+=(--time "$(hass.config.get 'refresh_time')")
OR
b) A second option be introduced to the config so that the influxdb glances instance refresh time can be set independently of the browser instance.

For my current purposes (and probably for many others) option a) would be entirely sufficient.

GitHub
Glances - Community Hass.io Add-on for Home Assistant - hassio-addons/addon-glances

Add button for stopping addon auto-update

Problem/Motivation

No possibilty to skip (bugged) releases or set the auto-update on hold.

Expected behavior

A button which allows to stop the auto-update of addons.

Actual behavior

No way to stop the auto-update for add-ons.

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

no data export glances to influx

Problem/Motivation

Add-on config:

process_info: false
refresh_time: 10
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
influxdb:
  enabled: true
  host: a0d7b954-influxdb
  port: 8086
  interval: 10
  ssl: false
  version: 1
  username: xxxxx
  password: xxxxx
  database: glances
  prefix: localhost
  token: ""
  bucket: glances
  org: myorg

Log:

 Add-on: Glances
 A cross-platform system monitoring tool
-----------------------------------------------------------
 Add-on version: 0.18.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.3.6
 Home Assistant Supervisor: 2023.03.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
INFO: Starting Glances...
Glances Web User Interface started on http://127.0.0.1:61209/
INFO: Starting NGinx...
Traceback (most recent call last):
  File "/usr/bin/glances", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/glances/__init__.py", line 179, in main
    start(config=core.get_config(), args=core.get_args())
  File "/usr/lib/python3.10/site-packages/glances/__init__.py", line 108, in start
    mode = GlancesMode(config=config, args=args)
  File "/usr/lib/python3.10/site-packages/glances/standalone.py", line 45, in __init__
    self.stats = GlancesStats(config=config, args=args)
  File "/usr/lib/python3.10/site-packages/glances/stats.py", line 39, in __init__
    self.load_modules(self.args)
  File "/usr/lib/python3.10/site-packages/glances/stats.py", line 90, in load_modules
    self.load_exports(args=args)
  File "/usr/lib/python3.10/site-packages/glances/stats.py", line 167, in load_exports
    self._exports[export_name] = export_module.Export(args=args, config=self.config)
  File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 51, in __init__
    self.client = self.init()
  File "/usr/lib/python3.10/site-packages/glances/exports/glances_influxdb.py", line 65, in init
    db = InfluxDBClient(
  File "/usr/lib/python3.10/site-packages/influxdb/client.py", line 115, in __init__
    self.__port = int(port)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Supervisor log:

23-03-26 12:03:07 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-26 12:03:07 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-26 12:03:07 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)
23-03-26 12:08:11 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-26 12:08:11 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-26 12:08:11 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-26 12:08:11 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)
23-03-26 12:13:15 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-26 12:13:15 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-26 12:13:15 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-26 12:13:15 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)
23-03-26 12:18:18 WARNING (MainThread) [supervisor.addons.options] Unknown option 'version' for Glances (a0d7b954_glances)
23-03-26 12:18:18 WARNING (MainThread) [supervisor.addons.options] Unknown option 'token' for Glances (a0d7b954_glances)
23-03-26 12:18:18 WARNING (MainThread) [supervisor.addons.options] Unknown option 'bucket' for Glances (a0d7b954_glances)
23-03-26 12:18:18 WARNING (MainThread) [supervisor.addons.options] Unknown option 'org' for Glances (a0d7b954_glances)

how to fix the correct operation before upgrading to the current version Core 2023.3.6

Glances is terminated when starting up

Problem/Motivation

Glances web UI doesn't show up, logs say 'Terminated'

Expected behavior

The logs should explain why glances was terminated

Actual behavior

The logs say 'Terminated' and I can't figure out how to fix it.

Steps to reproduce

Not sure how to reproduce it, I'm running a 'home assistant supervised' ubuntu installation on a laptop with ample disk/cpu. HA and system on latest stable versions.
There's an working influxdb addon running, it has a glances user and a glances db.

This is the part of the log where glances is started with debug level 'trace'. :

INFO: Starting Glances...
TRACE: bashio::config: refresh_time
TRACE: bashio::jq: /data/options.json if (.refresh_time == null) then
            null
        elif (.refresh_time | type == "string") then
            .refresh_time // empty
        elif (.refresh_time | type == "boolean") then
            .refresh_time // false
        elif (.refresh_time | type == "array") then
            if (.refresh_time == []) then
                empty
            else
                .refresh_time[]
            end
        elif (.refresh_time | type == "object") then
            if (.refresh_time == {}) then
                empty
            else
                .refresh_time
            end
        else
            .refresh_time
        end
TRACE: bashio::var.false: false
TRACE: bashio::config.false: process_info
TRACE: bashio::config: process_info
TRACE: bashio::jq: /data/options.json if (.process_info == null) then
            null
        elif (.process_info | type == "string") then
            .process_info // empty
        elif (.process_info | type == "boolean") then
            .process_info // false
        elif (.process_info | type == "array") then
            if (.process_info == []) then
                empty
            else
                .process_info[]
            end
        elif (.process_info | type == "object") then
            if (.process_info == {}) then
                empty
            else
                .process_info
            end
        else
            .process_info
        end
TRACE: bashio::var.false: false
Terminated
INFO: Starting NGinx...

My glances config (tried ssl false/true, password with/without quotes):

log_level: trace
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: 'mypassword'
  database: glances
  prefix: localhost
  interval: 60

Proposed changes

More info on why glances is terminated.

Retention policies are not created on influxdb

Problem/Motivation

I can't query any data on influxdb

Expected behavior

I want retention policies to be automatically created

Actual behavior

wen I run a basic select statement I get the following error:

select * from rpi.cpu
ERR: retention policy not found: rpi

Steps to reproduce

Basic influxdb with basic access and config

Built-In Disk Sensors

Hello,

I'm trying to find a way to represent these values (most importantly "/backup") as a sensor in the UI:

grafik

Sadly, the built-in sensors will always show the same values for "used" and "used %":

grafik

Do you see any way to access the "real" values?

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.