i want to monitor a mikrotik load balancer (pcc) with ip on wan natted.
so i can't monitor from outside mikrotik.
i can monitor mikrotik 4011 from a remote chr on datacenter with VPN.
works all fine, but i want to check if a wan is down
so, if a run on terminal in 4011
Code: Select all
:put ([:pick [/tool netwatch print as-value where comment="MONITOR - WAN1"] 0]->"status");
i try to integrate this ros command in dude to monitor if a wan is down
so i create a function
name: mikrotik_netwatch_wan1
code:
Code: Select all
ros_command(":put ([:pick [/tool netwatch print as-value where comment=\"MONITOR WAN1\"] 0]->\"status\");")
create probes
name: mikrotik_netwatch_wan1
type: function
agent: default
available : 1=1
error : if(mikrotik_netwatch_wan1()=up, "", "down")
value: mikrotik_netwatch_wan1()
unit: [empty]
but when i add this probe to device i have "parse failed"
some can help to improve this monitoring?
thank you in advance