Community discussions

MikroTik App
 
User avatar
edwardrost
just joined
Topic Author
Posts: 5
Joined: Tue Nov 11, 2008 11:02 am

Help using "array_element" function plz

Mon Nov 17, 2008 2:12 pm

hi all
plz help. what i do wrong?
i've 2 questions

1. i want to monitor tnsping (or some external program via execute function)
i make a function tnsping_myora - array_element(execute("tnsping","myora"), "1")
it compiles without errors, but when i make a note [tnsping_myora] i have empty output. When I make a note [array_element(execute("tnsping","myora"),"1")] i have "parse failed"
even i write a function array_element(execute("echo","hello"),"1") i also have "parse failed"
maybe i misused array_element?
it seems like array_element takes all output from execute as one string

2. Can i somehow use 2nd or 3rd device's IP-address? I want to make a probe for other interface. Now i made it using my function ping IP-1 - array_element(ping(device_property("CustomField1")) , 0) and then make average (i see it here on forum). But it seems to me unsightly to use Device.CustomField1 while have many IP-addresses, but i couldnt extract address using [array_element(ping(device_property("AddressesColumn")) , 1)]
maybe i misused array_element again? :-(
maybe array_element takes all addresses list as 1 string?

Who is online

Users browsing this forum: No registered users and 14 guests