Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glances 4.X breaks support with "gethomepage.dev" #2763

Closed
FurkanVG opened this issue May 12, 2024 · 71 comments
Closed

Glances 4.X breaks support with "gethomepage.dev" #2763

FurkanVG opened this issue May 12, 2024 · 71 comments
Labels

Comments

@FurkanVG
Copy link

Describe the bug
Firstly, i rarely do bug reports, so spare me for mistakes.

I am using gethomepage.dev for my personal purpose. In this im using their Service Widgets of Glances (https://gethomepage.dev/latest/widgets/services/glances/) to display some stats from Glances on my homepage:

image

I also use Watchtower to (mostly) auto-update my docker containers. This includes glances too. Today morning, my glance docker stack got updated, which broke it:

image

I have some tech knowledge, but not much. The error message in Homepage is giving me some weird infos:

Something went wrong.
TypeError: Z.find is not a function

_g@https://home.XXX.de/_next/static/chunks/1382.e214cc315189d017.js:1:5393
A@https://home.XXX.de/_next/static/chunks/1382.e214cc315189d017.js:1:19991
59835/g/h<@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:34754
n@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:17128
R@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:32437
div
li
M@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:36329
ul
J@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:40392
div
3980/L<@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:78657
div
l@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:107390
14614/k<@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:96931
14614/M<@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:95614
l@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:107390
3980/C<@https://home.XXX.de/_next/static/chunks/1486-4892647c2bdc88fd.js:1:76607
div
$@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:40892
div
div
ge@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:60240
n@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:17128
75182/Y<@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:90769
ve@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:58246
div
div
div
we@https://home.XXX.de/_next/static/chunks/pages/index-13ff1c2d6f3e37ec.js:1:67874
a@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:16145
a@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:15788
s@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:16704
u@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:15216
75182/Y<@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:90769
90753/t.default<@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:14467
l@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:1248
n@https://home.XXX.de/_next/static/chunks/pages/_app-b877b7641e51de94.js:1:5712
r@https://home.XXX.de/_next/static/chunks/main-b752bfcc638d3cc1.js:1:6992
Y@https://home.XXX.de/_next/static/chunks/main-b752bfcc638d3cc1.js:1:9236
ie@https://home.XXX.de/_next/static/chunks/main-b752bfcc638d3cc1.js:1:11878
Something went wrong.
Typ_

If i check my Browser console, i get lots of Errors. I took out one snippet:

My Homepage is trying to call this URL and it returns into an Error
https://home.XXX.de/api/services/proxy?type=glances&group=FURKANS-KALI+Performances&service=Memory+Usage&endpoint=3%2Fmem&query=%7B%22refreshInterval%22%3A1000%7D

image

Im guessing now, that Glances 4.X did some reconstruction of how the API works aka how some values can be called. For this to be fixed, gethomepage.dev would need to update their glances modules?

To Reproduce
Steps to reproduce the behavior:

  • nicolargo/glances:3.4.0.5 works and has no issues
  • nicolargo/glances:4.0.1 breaks it instantly

Expected behavior
As stated above in the screenshots, my homepage should be able to fetch the values without problems.

OS:
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Raspi 4B

Like I said, i think this is an issue on homepage side, but before i go their, i wanted to ask here if this issue is known.
Thanks!

@2ndwonder
Copy link

Same here

@sgrtye
Copy link

sgrtye commented May 12, 2024

In services.yaml, adding 'version: 4' to each widget should solve your problem.

Details can be found in the homepage documentation for glances regarding the support for glances 4.X.

@joshoram80
Copy link

There is still an issue that I am discussing with the Hompage dev. Occasionally the sensors module outputs incorrect data and Homepage throws an error.

TypeError: Cannot read properties of undefined (reading 'value')
    at 1382.e214cc315189d017.js:1:5880
    at No (framework-95233f837b560043.js:1:64015)
    at zo (framework-95233f837b560043.js:1:64473)
    at Object.useState (framework-95233f837b560043.js:1:70894)
    at n.useState (framework-95233f837b560043.js:1:136831)
    at g (1382.e214cc315189d017.js:1:5597)
    at Eo (framework-95233f837b560043.js:1:63196)
    at Pu (framework-95233f837b560043.js:1:74884)
    at xi (framework-95233f837b560043.js:1:121319)
    at bs (framework-95233f837b560043.js:1:109372) 
{componentStack: '\n    at g (https://my.domain/_next/static/ch…t/static/chunks/main-b752bfcc638d3cc1.js:1:11880)'}
componentStack

It works for a few seconds but then the error is thrown.

Accessing the API endpoint via curl even with the error seems to send back correct data.

@joshoram80
Copy link

OK so testing with curl, I have on a couple of occasions had the API return {"Package id 0":[]} instead of {"Package id 0":[{"label":"Package id 0","unit":"C","value":46,"warning":100,"critical":100,"type":"temperature_core","key":"label"}]}

@sylv3rblade
Copy link

sylv3rblade commented May 13, 2024

looking at the web ui, the whole sensors area just drops out and there's a spike of cpu while it's loading.

I'll revert to the last v3 docker image for now

Screen.Recording.2024-05-13.at.8.37.48.AM.mov

@shamoon
Copy link

shamoon commented May 13, 2024

Homepage dev here. We’ve had v4 support ready to go long in anticipation of this. I think the sensors issue is separate entirely. I would suggest that this issue can be closed.

See gethomepage/homepage#3196

@FurkanVG
Copy link
Author

@shamoon
I switched to V4 and the issue mainly exists still.
As you stated, this is rather a homepage issue than glances?
SHould this issue be closed here and an issue created on your github?
Thanks!

@billybanana80
Copy link

Sensor information is not showing at all in v4 of Glances, so Homepage has nothing to reference to for the Temperature widget. I don't see how this is a Homepage issue.

@joshoram80
Copy link

It's the API,. occasionally it returns blank data for sensor. I haven't had an issue with the data endpoints. It's not really a Homepage issue, other than it not handling the blank API return, but the CPU spikes and blank data shouldn't really happen to begin with.

@billybanana80
Copy link

I went back to v3.4 for now anyway.

@nicolargo
Copy link
Owner

Concerning the sensors issue, can ou please test it regarding to the comment #2765 (comment).

For the others requests, check the new API here: https://github.com/nicolargo/glances/blob/develop/docs/api.rst

@NolandTech
Copy link

Addding version: 4 In the widgets.yaml works for the header widget only...
adding version: 4 for service widgets doesn't work... still getting
Something went wrong.
TypeError: D.find is not a function
TypeError: S.find is not a function
TypeError: g.find is not a function
ETC...

@shamoon
Copy link

shamoon commented May 13, 2024

Screenshot 2024-05-13 at 9 16 13 AM
- Glances Viz v4:
    - CPU Usage:
        widget:
          type: glances
          url: http://localhost:61208
          metric: cpu
          version: 4
    - Memory:
        widget:
          type: glances
          url: http://localhost:61208
          metric: memory
          version: 4

@FurkanVG
Copy link
Author

Screenshot 2024-05-13 at 9 16 13 AM
- Glances Viz v4:
    - CPU Usage:
        widget:
          type: glances
          url: http://localhost:61208
          metric: cpu
          version: 4
    - Memory:
        widget:
          type: glances
          url: http://localhost:61208
          metric: memory
          version: 4

Are you trying to point out it should work with v4?

To show again, this is my .yaml snippet:

- RASPBERRYPI Performances:
    - CPU Usage:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: cpu
         version: 4
    - Memory Usage:
        style: row
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: memory
         version: 4
    - Temperature:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: sensor:cpu_thermal 0
         version: 4

But it looks like this:

image

@FurkanVG
Copy link
Author

Concerning the sensors issue, can ou please test it regarding to the comment #2765 (comment).

For the others requests, check the new API here: https://github.com/nicolargo/glances/blob/develop/docs/api.rst

I have run the curl command on my instance:

root@raspberrypi:/var/lib/docker/volumes/Homepage-Config/_data# while true; do curl "http://localhost:61208/api/4/sensors"; echo ""; sleep 1; done
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[]
[]
[]
[]
[]
[]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":69,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[]
[]
[]
[]
[]
[]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":70,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
[{"label":"cpu_thermal 0","unit":"C","value":71,"warning":null,"critical":null,"type":"temperature_core","key":"label"}]
^C

it sometimes loses the infos, but i can not relate if this is relevant directly with my issue, since i dont get any infos.

@RazCrimson
Copy link
Collaborator

@shamoon

This issue would get fixed once #2766 is released.

But Homepage should be handling the empty response ([] ) given by the sensors plugin API as it is a valid result if you are using glances on non-linux systems.

@shamoon
Copy link

shamoon commented May 13, 2024

Again, theres more than one issue discussed here which is confusing. But regarding sensors, I can make homepage handle [] but that seems... odd, and I wasnt under the impression the API ever did that before. Its not such a stretch to imagine other integrations will also not handle an API endpoint that returns an empty array (with a normal http status) so perhaps that choice could be reconsidered, but thats up to you guys, ofc.

@joshoram80
Copy link

I have never seen it happen on v3.
Also I am not using windows, but I am using docker, and I get a lot of the empty return values as well.

@NolandTech
Copy link

Screenshot 2024-05-13 at 9 16 13 AM ```yaml - Glances Viz v4: - CPU Usage: widget: type: glances url: http://localhost:61208 metric: cpu version: 4 - Memory: widget: type: glances url: http://localhost:61208 metric: memory version: 4 ```

Yeah that works, Thank you!

@RazCrimson
Copy link
Collaborator

RazCrimson commented May 13, 2024

@shamoon

Again, theres more than one issue discussed here which is confusing. But regarding sensors, I can make homepage handle [] but that seems... odd, and I wasnt under the impression the API ever did that before. Its not such a stretch to imagine other integrations will also not handle an API endpoint that returns an empty array (with a normal http status) so perhaps that choice could be reconsidered, but thats up to you guys, ofc.

In regards to the empty array, the sensors data which contains the below items:

  • FanSpeed & CpuTemperature are present only on linux (Limitation from a dependency - psutil Reference).
  • Battery Info - Not available for devices without a battery
  • HDD Temp - Not available if no hddtemp daemon is setup

Hence the sensors API returning empty array is a possible and valid case in some scenarios. So I think integrations should these cases unless their usecase doesn't need to account for the edge-cases specified above.

Please try out glances on other devices/platforms and i believe you can notice the differences I've mentioned above.

@shamoon
Copy link

shamoon commented May 13, 2024

Sorry, I mean intermittently returning the empty array. If a sensor just isnt supported at all I agree, but like the comment above #2763 (comment) where it returns expected data on some API calls and not on others. If the merged PR you linked to prevents that then all good, thanks!

@RazCrimson
Copy link
Collaborator

@joshoram80
Please try out the newly released images tagged 4.0.2 or dev.
The regression caused by the v4 should be fixed now

@RazCrimson
Copy link
Collaborator

RazCrimson commented May 13, 2024

Sorry, I mean intermittently returning the empty array. If a sensor just isnt supported at all I agree, but like the comment above #2763 (comment) where it returns expected data on some API calls and not on others. If the merged PR you linked to prevents that then all good, thanks!

Intermittently missing entries or returning empty array was a bug due to some race conditions.
That should be fixed now in 4.0.2. :)

@nicolargo seems to be making the docker images releases now for dev. Thanks for the speedy release!

Will close the issue in next couple days as long as no other issues arise.

@joshoram80
Copy link

@RazCrimson all seems to be working fine now ;D. No errors in homepage or with curl

@joshoram80
Copy link

joshoram80 commented May 14, 2024

Something is still wrong it seems... I came back home after being away for a few hours and the error is still there. Same as before. I can't see exactly what caused it, whether it was an empty API call return or not, but it only takes one for the error to happen.

While i was actively monitoring it it appeared to be working correctly.

TypeError: Cannot read properties of undefined (reading 'value')
    at 1382.e214cc315189d017.js:1:5880
    at No (framework-95233f837b560043.js:1:64015)
    at zo (framework-95233f837b560043.js:1:64473)
    at Object.useState (framework-95233f837b560043.js:1:70894)
    at n.useState (framework-95233f837b560043.js:1:136831)
    at g (1382.e214cc315189d017.js:1:5597)
    at Eo (framework-95233f837b560043.js:1:63196)
    at Pu (framework-95233f837b560043.js:1:74884)
    at xi (framework-95233f837b560043.js:1:121319)
    at bs (framework-95233f837b560043.js:1:109372) Object

@RazCrimson
Copy link
Collaborator

@shamoon

I am not sure what's the behaviour of the code used in the Graphs.

But FYI, a sensor can disappear from the sensors list or a newer sensor can appear in the list while glances is running.

Reason for the above is glances merely tries to fetch all sensor data and sends them. So any activity like adding/removing drives or fans can cause sensor changes.

Handling the above case and empty array should hopefully fix all issues on homepage end.

@shamoon
Copy link

shamoon commented May 14, 2024

I can look at it on the homepage side but imho this is a regression in glances. These users aren't disconnecting sensors, they're just letting homepage ping the glances api over time, just like it has always done. But seemingly unpredictably, sometimes the api sends nothing back, and as another user reported the entire sensors section disappears temporarily in the glances dashboard too. Again, to me this seems like unexpected behavior. Ya know, imho

@elendil7
Copy link

Same issue here +1! Except for me its Dashy + Glances, with Dashy being unable to fetch the data.

image

@ekalp
Copy link

ekalp commented May 14, 2024

Also have the issue with homepage + glances 4.x. Ended up rolling back to 3.4.0.5 for now. Thank you to everyone for the attention/logs/debugging to help get this resolved!

@RazCrimson
Copy link
Collaborator

RazCrimson commented May 14, 2024

@Matt-UKTX @FurkanVG
Can anyone of you try the latest dev docker images and check if things are working or not?

@FurkanVG
Copy link
Author

FurkanVG commented May 14, 2024

@Matt-UKTX @FurkanVG Can anyone of you try the latest dev docker images and check if things are working or not?

Latest :dev with version 4 flag in glances yaml config did not fix anything for my side (same issues like the screenshots above)

also @RazCrimson idk how i should run your commands if i run my glances via docker?
ty!

@ekalp
Copy link

ekalp commented May 14, 2024

Also tested the dev build via Docker on Unraid against homepage and no change. Behavior remains the same.

@RazCrimson
Copy link
Collaborator

@FurkanVG Could you try this command?

docker run -p 61208:61208 -e GLANCES_OPT="-w --disable-plugin alert,processlist,wifi,fs,network,diskio,cpu,load,mem,memswap,quicklook,gpu,ip,raid,containers,folders,percpu,uptime,amps,processcount,core,cloud,help,now,ports,system -d" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host docker.io/nicolargo/glances:dev

The logs should automatically start showing up when you run this.

@Matt-UKTX
Copy link

The issue persists for me on glances:latest-full. Looks like this image hasn't yet been updated to 4.0.2.

@RazCrimson
Copy link
Collaborator

@Matt-UKTX
latest-full is point to 4.0.2 but the fix added in 4.0.2 is not completely fixing the sensors issue. It fixed the issue on my end, but others seems to be having the issue.

Could you try the above command and provide logs?
The logs generated with this should be more detailed and let me know where things are failing.

@Matt-UKTX
Copy link

Matt-UKTX commented May 15, 2024

@Matt-UKTX latest-full is point to 4.0.2 but the fix added in 4.0.2 is not completely fixing the sensors issue. It fixed the issue on my end, but others seems to be having the issue.

Could you try the above command and provide logs? The logs generated with this should be more detailed and let me know where things are failing.

Here you go...
glances_logs.txt
Looks like it cannot read the HDD temp sensor.

2024-05-15 04:06:54,117 -- DEBUG -- Cannot connect to an HDDtemp server (127.0.0.1:7634 => [Errno 111] Connection refused)
2024-05-15 04:06:54,117 -- DEBUG -- Disable the HDDtemp module. Use the --disable-hddtemp to hide the previous message.
2024-05-15 04:06:54,118 -- DEBUG -- PluginModel glances.plugins.sensors.sensor.glances_hddtemp update return [] in 0.001111 seconds
2024-05-15 04:06:54,119 -- DEBUG -- PluginModel glances.plugins.sensors update return [{'label': 'k10temp 0', 'unit': 'C', 'value': 50, 'warning': 70, 'critical': 70, 'type': 'SensorType.CPU_TEMP', 'key': 'label'}] in 0.003053 seconds

Now here is something weird, when I go to homepage now, the only sensor working is the temp sensor and the rest are missing.
image

This is what I see in glances web interface:
image

@RazCrimson
Copy link
Collaborator

@Matt-UKTX

You mentioned that u had Glances had Temperature data earlier in v3.
So now is the sensors plugin behavior consisted with what was observed in v3?

Other plugins/items in dashboard should go back to normal once you remove the below portion from the above command

--disable-plugin alert,processlist,wifi,fs,network,diskio,cpu,load,mem,memswap,quicklook,gpu,ip,raid,containers,folders,percpu,uptime,amps,processcount,core,cloud,help,now,ports,system -d

We had disabled other plugins to prevent unnecessary entries in the logs, that is causing the dashboard to fail.

@Matt-UKTX
Copy link

Matt-UKTX commented May 15, 2024

@Matt-UKTX

You mentioned that u had Glances had Temperature data earlier in v3. So now is the sensors plugin behavior consisted with what was observed in v3?

Other plugins/items in dashboard should go back to normal once you remove the below portion from the above command

--disable-plugin alert,processlist,wifi,fs,network,diskio,cpu,load,mem,memswap,quicklook,gpu,ip,raid,containers,folders,percpu,uptime,amps,processcount,core,cloud,help,now,ports,system -d

We had disabled other plugins to prevent unnecessary entries in the logs, that is causing the dashboard to fail.

When I ran the glances:dev package it looked like the sensor data was populating again, like it did in v3. However, I didn't observe it for long enough to see if the issue was intermittent. For my own sanity, are you sure that glances:dev and glances:latest-full are using the same image? It seems like the glances:dev image fixed the issue, whereas it has never worked at all in glances:latest-full.

@RazCrimson
Copy link
Collaborator

@Matt-UKTX

For my own sanity, are you sure that glances:dev and glances:latest-full are using the same image? It seems like the glances:dev image fixed the issue, whereas it has never worked at all in glances:latest-full.

No they are not the same. latest-full is the same as 4.0.2
But latest-full and dev are difference images. dev image has additional changes that may 'possibly fix' the bug.

Since I can't reproduce the issue on my end, I just used dev image as a easy way for other users to test fixes.

I didn't want to make a release hastily like I did with 4.0.2 as it didn't completely fix the sensors plugin for others.

I'll go ahead and make a new release if the changes in dev fixes the problems for the others too.

@RazCrimson
Copy link
Collaborator

@FurkanVG @ekalp @elendil7

Could I trouble you all to try the dev images and see if things are working?

@Matt-UKTX
Copy link

@Matt-UKTX

For my own sanity, are you sure that glances:dev and glances:latest-full are using the same image? It seems like the glances:dev image fixed the issue, whereas it has never worked at all in glances:latest-full.

No they are not the same. latest-full is the same as 4.0.2 But latest-full and dev are difference images. dev image has additional changes that may 'possibly fix' the bug.

Since I can't reproduce the issue on my end, I just used dev image as a easy way for other users to test fixes.

I didn't want to make a release hastily like I did with 4.0.2 as it didn't completely fix the sensors plugin for others.

I'll go ahead and make a new release if the changes in dev fixes the problems for the others too.

Makes total sense. Thanks for clarifying. It certainly appears to have fixed the issue for me. Please let me know when the updates get made to latest-full.

@FurkanVG
Copy link
Author

@FurkanVG @ekalp @elendil7

Could I trouble you all to try the dev images and see if things are working?

Just tried the newest :dev, no difference.

Here are my logs from your docker run command:
glances-logs.log

@RazCrimson
Copy link
Collaborator

RazCrimson commented May 15, 2024

@FurkanVG
Taking a look at the logs, I can see the sensor data showing up fine

2024-05-15 06:06:37,222 -- DEBUG -- PluginModel glances.plugins.sensors update return [{'label': 'cpu_thermal 0', 'unit': 'C', 'value': 72, 'warning': None, 'critical': None, 'type': 'SensorType.CPU_TEMP', 'key': 'label'}] in 0.012847 seconds

What issue are you facing on latest dev? Homepage is not working with those Z.find errors?

If the issue is with homepage, can you just try the dev image instead of latest (or whatever you use) with your usual setup and let me know if that works?

Note: Use my command to only generate logs. If you try to use the container spawned by that command with homepage, you will have issues with homepage as all other plugins are switched off.

@FurkanVG
Copy link
Author

@FurkanVG Taking a look at the logs, I can see the sensor data showing up fine

2024-05-15 06:06:37,222 -- DEBUG -- PluginModel glances.plugins.sensors update return [{'label': 'cpu_thermal 0', 'unit': 'C', 'value': 72, 'warning': None, 'critical': None, 'type': 'SensorType.CPU_TEMP', 'key': 'label'}] in 0.012847 seconds

What issue are you facing on latest dev? Homepage is not working with those Z.find errors?

If the issue is with homepage, can you just try the dev image instead of latest (or whatever you use) with your usual setup and let me know if that works?

Note: Use my command to only generate logs. If you try to use the container spawned by that command with homepage, you will have issues with homepage as all other plugins are switched off.

Im running :dev on glances.
Yes i run into these Z.find errors, see here:
image

A snipped from my homepage services.yaml using glances:

### Main Config for Services ###
- RASPBERRYPI Performances:
    - CPU Usage:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         version: 4
         metric: cpu
    - Memory Usage:
        style: row
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: memory
         version: 4
    - Temperature:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: sensor:cpu_thermal 0
         version: 4
    - Disk Usage:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: disk:sda
         version: 4
    - Network Usage:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: network:eth0
         version: 4
    - Network Usage:
        widget:
         type: glances
         url: http://192.168.178.3:61208/
         metric: network:lo
         version: 4

- FURKANS-KALI Performances:
    - CPU Usage:
        widget:
         type: glances
         url: http://192.168.178.177:61208/
         metric: cpu
         version: 4
    - Memory Usage:
        style: row
        widget:
         type: glances
         url: http://192.168.178.177:61208/
         metric: memory
         version: 4
    - Temperature:
        widget:
         type: glances
         url: http://192.168.178.177:61208/
         metric: sensor:Package id 0
         version: 4
    - Disk Usage:
        widget:
         type: glances
         url: http://192.168.178.177:61208/
         metric: disk:nvme0n1p2

As stated, once i switch to the glances 3.X (and remove the v4 flags), it works fine.

@RazCrimson
Copy link
Collaborator

RazCrimson commented May 15, 2024

@FurkanVG
Could you just visit http://192.168.178.3:61208/ and check if the web UI shows all the data that you would like to see?

@FurkanVG
Copy link
Author

@RazCrimson that works fine:
image

@RazCrimson
Copy link
Collaborator

So things are working fine on glances end, but homepage is still failing. 🤔

@FurkanVG
I see there are multiple IP addresses/devices on ur homepage config.
Are all the glances servers using the dev image?

@RazCrimson
Copy link
Collaborator

@FurkanVG Found the problem.
In you homepage services.yml use http://192.168.178.3:61208 not http://192.168.178.3:61208/
The / at the end is causing problems

@shamoon
Copy link

shamoon commented May 15, 2024

First item in the troubleshooting guide: https://gethomepage.dev/latest/more/troubleshooting/#service-widget-errors

As I said, this issue is a bit confusing because its about two separate issues, but I think the actual OP here just has a config issue or something like that. If OP is having an issue setting up homepage with glances they can open a discussion / ask our bot.

Again, perhaps this one should've been closed, vs renamed to be about the sensors issue. Either way, thanks Raz for all the work on the sensors issue

@RazCrimson
Copy link
Collaborator

Well the sensors plugin was indeed a regression from the glances.

Anyways, 4.0.3 is out and should be released soon. Hopefully everything works now. 😅

@Matt-UKTX You can switch back to latest now.

Closing the issue as nothing more to be done glances end.

@FurkanVG
Copy link
Author

@FurkanVG Found the problem. In you homepage services.yml use http://192.168.178.3:61208 not http://192.168.178.3:61208/ The / at the end is causing problems

Funny. with Glances 3.X, it worked perfectly fine having the "/" :D I had not changed my yaml for months, and i guess V4 handles it much different than V3.

Thanks @shamoon. Everything works now.

@Matt-UKTX
Copy link

Well the sensors plugin was indeed a regression from the glances.

Anyways, 4.0.3 is out and should be released soon. Hopefully everything works now. 😅

@Matt-UKTX You can switch back to latest now.

Closing the issue as nothing more to be done glances end.

Hi, has latest-full been updated yet? i'm pulling the image of docker hub and I still have the issue. The ID of the image is: 950e1e27ec4f3bc696e67e5a9953f9ae4066ec660fefc0d09f1501c6c3f0e2b3

@ekalp
Copy link

ekalp commented May 16, 2024

I’m using the latest image as well, and have tried the most recent dev image and still see the issue intermittently in homepage across my three Synology units and my Unraid box.

The scenario for the repro is navigate to the tab where I have glances data exposed, wait for 30-60 seconds as it updates and then it throws the same errors noted in this bug.

Not opposed to filing a new bug as this is closed.

@Matt-UKTX
Copy link

Well the sensors plugin was indeed a regression from the glances.
Anyways, 4.0.3 is out and should be released soon. Hopefully everything works now. 😅
@Matt-UKTX You can switch back to latest now.
Closing the issue as nothing more to be done glances end.

Hi, has latest-full been updated yet? i'm pulling the image of docker hub and I still have the issue. The ID of the image is: 950e1e27ec4f3bc696e67e5a9953f9ae4066ec660fefc0d09f1501c6c3f0e2b3

It appears that latest-full hasn't been updated but latest has.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests