Community discussions

MikroTik App
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Topic Author
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Nested functions in probes, numbers in custom fields

Wed Apr 03, 2019 10:19 pm

Hi all,

It looks like using nested functions in probes don't work as expected. Runnind the Dude 6.44 in a x86 instance (not CHR). 6.44.1 shows the very same behaviour.

These terms are working perfectly when being used individually in a function probe in the "available" line:
if(device_property("CustomField1")=device_property("CustomField2"),1,0)
ping(device_property("FirstAddress"))
Now we want this first probe to be dependent on ping - when the device is down, it has to be shown as down, no matter if the custom fields match.
This doesn't work:
if(and(device_property("CustomField1")=device_property("CustomField2"),ping(device_property("FirstAddress"))=1),1,0)
Nor does this:
if(and(if(device_property("CustomField1")=device_property("CustomField2"),1,0)=1,ping(device_property("FirstAddress"))=1),1,0)
It's always showing unavailable.
Using string_compare instead of a direct = didn't help either.

The fields contain two comma-separated numerical values (like 6.36 and 11,147)
when the fields are 6,36 and 11,147 the field comparison returns a mismatch as expected. But 6,36 and 6,48 doesn't. How this?
A bit background on this:
It's a large scale WiFi deployment, Custom1 contains our planned channels for two radio interfaces. Custom2 is fed externally with the current operating channels pulled from the controller.
We want to see where a mismatch occurs (i.e. AP turns orange on the map).

Any ideas on this?
Thanks,
-Chris

Who is online

Users browsing this forum: No registered users and 21 guests