jokob-sk / NetAlertX

๐Ÿ–ง๐Ÿ” WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
3.05k stars 184 forks source link

Logging internet speeds from the speedtest plugin and creating a graph, with using the official Ookla speedtest CLI #776

Closed dhanuhammer closed 1 month ago

dhanuhammer commented 2 months ago

Is there an existing issue for this?

Am I willing to test this? ๐Ÿงช

Can I help implement this? ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

Is your feature request related to a problem? Please describe

I saw that there is a page to monitor the devices but there should also be a page to show the historical speedtest data with the speedtest being run from the application. There should be a way to change the speedtest servers and other options.

Describe the solution you'd like

I would like a speedtest monitoring similar to device monitoring with historical data to check if the ISP is providing the bandwidth as per the subscription

Describe alternatives you've considered

There already is a project that monitors the network performance: https://github.com/mr-canoehead/network_performance_monitor Perhaps a few segments can be incorporated from here

Anything else?

https://github.com/mr-canoehead/network_performance_monitor

jokob-sk commented 2 months ago

Hi there,

there is already an internet speedtest plugin and a web services plugin check for external websites.

https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_speedtest https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/website_monitor

I'm unsure how much work/value it would be to have one more plugin for speedtests. I understand that this one would be probably only for the devices themselves? Currently I'm leaning to probably no or yes if someone wants to write a plugin and maintain it. But building graphs into the plugin system is a challenge by itself. The app is already big and sometimes hard to maintain so I need to be sensible, what to support as unfortunately this is not my main job ๐Ÿ˜…. Let me think about it and see if others are interested in this feature.

Thanks, j

dhanuhammer commented 2 months ago

Hello Thanks for your reply. I didn't mean to ask for another plugin but to use the existing plug-in and create a graph from it's periodic data. If the speedtest runs every 30 mins it will generate a good graph and it can be used to know the speeds throughout the day. Similarly such data can be collected over a long time, average speeds of everyday in a month can be plotted over a year, and it can give good insight about the ISP. Then it would become a truly all in one application. I have seen some apps use grafana for this.

Also, may I know what speedtest does ur existing plug-in use? Like, Ookla?

On Fri, 30 Aug, 2024, 03:21 jokob-sk, @.***> wrote:

Hi there,

there is already an internet speedtest plugin and a web services plugin check for external websites.

https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/internet_speedtest

https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/website_monitor

I'm unsure how much work/value it would be to have one more plugin for speedtests. I understand that this one would be probably only for the devices themselves? Currently I'm leaning to probably no or yes if someone wants to write a plugin and maintain it. But building graphs into the plugin system is a challenge by itself. The app is already big and sometimes hard to maintain so I need to be sensible, what to support as unfortunately this is not my main job ๐Ÿ˜…. Let me think about it and see if others are interested in this feature.

Thanks, j

โ€” Reply to this email directly, view it on GitHub https://github.com/jokob-sk/NetAlertX/issues/776#issuecomment-2319094662, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ2BTSBCBKSIPTVWXMKFM7TZT6JW5AVCNFSM6AAAAABNK76656VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJZGA4TINRWGI . You are receiving this because you authored the thread.Message ID: @.***>

jokob-sk commented 2 months ago

Hi @dhanuhammer ,

Thanks for the info.

The speed test library that the plugin is using is this one here: https://pypi.org/project/speedtest-cli/

This application shouldn't be an all-in-one application (and this also depends on the user, someone might consider core features something else). Still I will consider alternative display of plugins data in the future, but it would precede the rebuild of the eIntegrations -> Plugins section, which is not a small task. The code isn't easily maintainable and adding more complexity to it would make this even more difficult in the future.

If you are up for a challenge, you can help out - I'm thinking of rebuilding that page to use datables, as most of the application. Once that's achieved I would add support for charts, which would then be used to display the speed test data.