Hi,
I have a question for you, is it possible to send a variable, eg [Device.CustomField2] in ros_command.
I want to write a universal function that will retrieve the appropriate parameter
ros_command(":local clientIP [Device.CustomField2]; :local peer; :local ph2; :foreach line in=[/ip ipsec policy print as-value where disabled=no and template!=yes and sa-dst-address=$clientIP] do={:foreach name,item in=$line do={if ($name=\"peer\") do= {:set peer $item}; if ($name=\"ph2-count\") do= {:set ph2 \"\"; if ($item=0) do={:set ph2 \"DOWN\"}; if ($item>0) do={:set ph2 \"UP\"};}; }; :put ($peer.\" \".$ph2)}")