monitor packet loss on interface and trigger action

Started by ja3far, February 17, 2023, 10:55:48 AM

Previous topic - Next topic
Hello,
I have an OpenVPN client tunnel interface (opt2) , under which I have a gateway configured with gateway monitoring enabled. Sometimes the VPN server from the provider side is overloaded, and that induces a packet loss. The packet loss is clearly seen in the RRD graphs. To fix the packet loss problem I simply need to restart the OpenVPN client, and get assigned to a new server pool that is not overloaded.

My question is the following: can I define a packet loss threshold that will trigger an action? the action would be to simply restart the OpenVPN client.

Thanks