Hi people,
I am using RB4xx router with 5.19 FW and I use the following script for connection status logging:
:log info "MONITOR493";
/interface ethernet monitor ether1 once do={:log info "ether1 state $status";}
/interface ethernet monitor ether2 once do={:log info "ether2 state $status";}
/interface ethernet monitor ether3 once do={:log info "ether3 state $status";}
/interface ethernet monitor ether4 once do={:log info "ether4 state $status";}
/interface ethernet monitor ether5 once do={:log info "ether5 state $status";}
/interface ethernet monitor ether6 once do={:log info "ether6 state $status";}
/interface ethernet monitor ether7 once do={:log info "ether7 state $status";}
/interface ethernet monitor ether8 once do={:log info "ether8 state $status";}
/interface ethernet monitor ether9 once do={:log info "ether9 state $status";}
/interface wireless monitor wlan1 once do={:log info "wlan1 state $"status" Signal $"signal-strength" SNR $"signal-to-noise" Noise $"noise-floor" Thruput $"p-throughput" Freq $"frequency"";}
:log info "routeWanDistance $[/ip route get [find comment="gatewayWAN"] distance]";
:log info "gwWanState $[/ip route get [find comment="gatewayWAN"] gateway-status]";
:log info "gwWLanState $[/ip route get [find comment="gw wlan1"] gateway-status]";};
The log script’s result running in winbox is the following:
script info MONITOR493
script info ether1 state link-ok
script info ether2 state link-ok
script info ether3 state link-ok
script info ether4 state link-ok
script info ether5 state link-ok
script info ether6 state link-ok
script info ether7 state link-ok
script info ether8 state link-ok
script info ether9 state link-ok
script info wlan1 state disabled Signal SNR Noise Thruput Freq
script info routeWanDistance 1
script info gwWanState 10.2.0.253 reachable via ether1
script info gwWLanState 192.168.3.254 unreachable
It works!
The log script’s result launched via API is the following:
script info MONITOR493
script info routeWanDistance 1
script info gwWanState 10.2.0.253 reachable via ether1
script info gwWLanState 192.168.3.254 unreachable
The monitor commands dosn’t work! Why?
There is somenthing wrong?
Dax.