Just check activity of the route

Hello. I have some static route and it may be active or not.
How could I check activity of the route (find the route by name,comment or number) in script and do something depending of result?

To check activity just use netwatch (TOOLS - NETWATCH). There you can put a script that does anything when the route is active (using the def gateway of the route) or inactive.

Regards!

To check activity just use netwatch (TOOLS - NETWATCH). There you can put a script that does anything when the route is active (using the def gateway of the route) or inactive.

Regards!

is not the best idea if you have more gateway to same ip o two router with distances.

try this, you can find by comment o anything
{
local status [ip route get value-name=active [find comment=gateway]]
if ($status= true) do={/log info “gateway is active”} else={/log error “gateway is down”}
}