Lissy93 / dashy

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
https://dashy.to
MIT License
17.07k stars 1.31k forks source link

[BUG] Glances Network Traffic Error #1608

Open tomasmusil opened 4 months ago

tomasmusil commented 4 months ago

Environment

Self-Hosted (Bare Metal)

System

Chrome 125

Version

3.1.1

Describe the problem

When using the source code v3.1.1 with Glances v4.0.7 the Network Traffic widget does not display any values (screenshot below) with these two errors in console:

Error: <path> attribute d: Unexpected end of attribute. Expected number, "M". and Error: <path> attribute d: Expected number, "Mundefined,NaNLLu…". both at src/components/Widgets/GlNetworkTraffic.vue:75 and at frappe-charts.min.esm.js:1.

These errors appear regularly with every attempted update of the widget. The same config worked with v3.0.1 without any issue.

Additional info

Active widget: image

Active config:

- name: Network Traffic
  icon: fas fa-ethernet
  widgets:
  - type: gl-network-traffic
    options: 
      hostname: http://localhost:61208
      limit: 300

Error stack: image

Full log: dashy.log

Please tick the boxes

CrazyWolf13 commented 4 months ago

Thanks for the report, yeah I've noticed that too, there also seem to be two more widgets broken as mentioned here: https://github.com/Lissy93/dashy/issues/1594#issuecomment-2118847185

nxfrvt commented 3 months ago

Hi @CrazyWolf13, I believe you can also add gl-network-interfaces to your list.

Dashy is unable to recognize that the interface is UP and retrieve the rx/tx data: obraz

Data is present at the URL Dashy is sending requests to so I guess there's some issue with processing it?

/api/4/network obraz

nxfrvt@nx-ASUS:/homelab/docker/dashy$ curl http://192.168.1.30:7700/api/4/network [{"bytes_sent":2876,"bytes_recv":5694,"speed":104857600,"key":"interface_name","interface_name":"enp2s0","alias":null,"bytes_all":8570,"time_since_update":1.6540348529815674,"bytes_recv_gauge":2579204429,"bytes_recv_rate_per_sec":3442.0,"bytes_sent_gauge":2799955611,"bytes_sent_rate_per_sec":1738.0,"bytes_all_gauge":5379160040,"bytes_all_rate_per_sec":5181.0}]n

/api/4/network/history/100 obraz

nxfrvt@nx-ASUS:/homelab/docker/dashy$ curl http://192.168.1.30:7700/api/4/network/history/100 {"enp2s0_bytes_recv_rate_per_sec":[["2024-06-05T22:06:30.813393",5111.0],["2024-06-05T22:06:32.877441",5207.0],["2024-06-05T22:06:34.949103",5306.0],["2024-06-05T22:06:34.951130",0.0],["2024-06-05T22:06:37.019253",2166.0],["2024-06-05T22:06:39.025045",3883.0],["2024-06-05T22:06:40.437483",5386.0],["2024-06-05T22:06:43.101690",7387.0],["2024-06-05T22:06:44.953842",2255.0], [...]