asbru-cm / asbru-cm

Ásbrú Connection Manager is a user interface that helps organizing remote terminal sessions and automating repetitive tasks.
https://www.asbru-cm.net/
GNU General Public License v3.0
971 stars 132 forks source link

Keepalives #728

Open vokborok opened 3 years ago

vokborok commented 3 years ago

Describe the solution you'd like

It would be great if some kind of keepalives for nodes might be configurable (ping, ssh connectivity etc.) and the status of the node being colored (green/gray) depending on keepalive result.

gfrenoy commented 3 years ago

The status of the connection is already shown, isn't it ?

When connected: image

When disconnected: image

Not sure to understand what that keepalive can bring ?

vokborok commented 3 years ago

In case env you are managing by asbru is not static, but dynamic and you have a lot of VMs, HW appliances or even docker containers which are redeployed often for testing purposes. In this case it would be very usefull to have an status of the host if it's already up before you connecting to it.

gfrenoy commented 3 years ago

Ok I understand the need but do we really want Ásbrú to become a monitoring system ?

That being said, we have to specify a little bit more how this should work.

1) Where/how do we have to show this information ? 2) Is this optional ? Where should we configure this ? 3) Are there different methods to "ping" the host ? How to configure them ? 4) How often should we check that the host is up ?

vokborok commented 3 years ago

1.Where/how do we have to show this information? whichever is reachable by any of choosen method (lets say ping/port)- node icon should be of particular colour. For example green - node is available, gray - not image

  1. Is this optional ? Where should we configure this ? I would do it optional, not everyone need this. I would suggest creating of new tab "availablility" in connection settings, so this option can be configured per node.

image

for port checking netcat tool might be used, something like: nc -z 192.168.1.1 443

  1. Are there different methods to "ping" the host ? How to configure them ? ping/port How to configure: choose method --> specify interval and portnum (if method == port) --> Save

  2. How often should we check that the host is up ? configurable

NRGLine4Sec commented 3 years ago

Good idea @vokborok ! I think this feature could be useful to resolve also problems I have some times.

In some cases, I have to mount VPN connection before establishing SSH, I use nmcli c up <connection_id> to mount the VPN with the pre-exec command, and nmcli c down <connection_id> in the post-exec command settings.

When I have multiple connections to the same host or when I have multiple connections of the same group of hosts (with the same settings of needed VPN connection). It's quite annoying when I have to disconnect to one host or one session because it put the VPN down.

And it could be very useful if the "keepalive" feature could be used to keep the VPN up when one the same group of host with the same needed VPN connection is still used.

I don't know how to implement this, maybe with the no execution of the post-exec command ?