leiweibau / Pi.Alert

Scan the devices connected to your WIFI / LAN and alert you the connection of unknown devices. It also warns if a "always connected" device disconnects. In addition, it is possible to check web services for availability. For this purpose HTTP status codes and the response time of the service are evaluated.
https://leiweibau.net
GNU General Public License v3.0
334 stars 25 forks source link

[Feature Request] Multiple switches and additional fields #298

Closed TheCableGuy99 closed 1 month ago

TheCableGuy99 commented 2 months ago

Hi,

I have switches that connected to more than one switch.

Is it possible to be able to have more than one uplink target?

Also, can you add a connection type "Fibre"

Lastly, can you add connection speeds for Ethernet? Possibilities I would suggest but also leave it editable for other possibilities. 10 Mbps 100 Mbps 1000 Mbps 10000 Mbps 20000 Mbps 25000 Mbps 40000 Mbps

Thanks.

leiweibau commented 2 months ago

I have switches that connected to more than one switch. Is it possible to be able to have more than one uplink target?

In the past, I have made a few improvements to the manual port configuration in terms of usability (You can click on entries from the drop-down list several times to expand the text in the input field). This should make it possible to configure this scenario.

TheCableGuy99 commented 2 months ago

are you referring to the ability to add dummy devices? If so, this is how I've been dealing with it, I just suggested the idea because I believe adding multiple uplinks for switches is a better resolution and easier to get my head around.

leiweibau commented 2 months ago

No, I am referring to https://github.com/leiweibau/Pi.Alert/blob/main/docs/NETWORK_RELATIONSHIP.md#lagg-hostserver-to-one-switch (Case 2). In the example I only use one switch, but of course you can also combine different devices with the corresponding port assignment from the drop-down list.

IMG_0191

Today I was thinking about the challenges involved in rewriting the network overview.

I only use one field for the input: All previous configurations would become invalid. Well, you could perhaps live with that. My approach here would be the following syntax: 1. device ID:port, 2. device ID:port, etc. However, a distinction must be made here if no port specification makes sense (WLAN, hypervisor, powerline). This is certainly feasible somehow, but it means a huge amount of work because the entire logic of the previous page creation changes.

I stick with 2 input fields and extend the target field and the property that the port field has: Previous configurations could be retained. But, no. That doesn't work. Example:

Switch A is connected with LAGG (2) to Switch B and with a connection to Switch C.

Target field: 2,3
Port field: 15,16,1

I can now guess which ports belong to which switch.

Unfortunately, this means for me at the moment (unless I'm missing something) that WITHOUT a rewrite at this point, I unfortunately cannot fulfill your request (this applies to your other feature request). Perhaps I can still manage a small hack or two to satisfy you a little more.

The thing is, the manual port configuration does exactly what I have in mind with the 1 field solution.

Another approach would be to remove the port assignment completely from the device details and make the network overview basically independent of it. All potential devices (switches, routers, etc) are in a list, you define the ports as you do now and then click together the devices for the individual ports. This also means rewriting the network overview, but I think it simplifies the compilation of the data. In this case, it would even be possible to run both overviews in parallel and thus facilitate migration.

TheCableGuy99 commented 2 months ago

Hey,

At the end of the day i'm just grateful for the work you put into this and developing it for us all. So whatever approach you want to adaopt (or leave it as it is) is fine with me.

It would be nice to find an easier way to link switches to multiple switches but honestly my heads a bit mashed with it so i'd say if you do want to work on it please adopt whatever approach you feel is best and least problematic to yourself.

Thanks.

leiweibau commented 1 month ago

Update released with https://github.com/leiweibau/Pi.Alert/commit/530948a7e9b2b0d78d3168e44ec55f68d0417b0c