Answer the question
In order to leave comments, you need to log in
How to know the status?
Good day everyone!
Started writing scripts. I would very much like to write a script so that it writes the status of the VPN connection of the interface to a variable. For example, if you enter "/interface ovpn-server monitor ovpn1" in the command line, then a table with parameters and their readings will be displayed in the terminal. I'm interested in one of the "status" parameters, it has two values "connected" and "disabled". Actually, the question is, is it possible to request only this parameter?
Answer the question
In order to leave comments, you need to log in
/interface l2tp-client monitor l2tp-out1 once do={:global STATUS $"status"}
:global STATUS
/interface l2tp-client monitor l2tp-out1 once do={:set STATUS $"status"}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question