Community discussions

MikroTik App
 
Arco van Bezooijen
newbie
Topic Author
Posts: 31
Joined: Sat Feb 05, 2005 1:33 pm
Location: The Netherlands
Contact:

interface running check

Sun Nov 20, 2005 11:49 pm

Hi,

I have this script running on my rb200 boards scheduled every xx minutes to check if a wireless interface is running or not. I now use several rb532's boards, but I can't get it to work. I'm not a scriptkiddy myself, someone on this forum made one for me. Could someone please help me?

:foreach iface in=( [ / interface wireless find interface-type="Atheros AR5212" ] . [ / interface wireless find interface-type="Atheros AR5213" ] ) do={
:set iface [ / interface wireless get $iface name ]
:if ( ( [ / interface wireless find name=$iface running=no ] != "" ) && ( [ / interface wireless find interface-type=virtual-AP master-interface=$iface running=true ] = "" ) && ( [ / interface wireless access-list find interface=$iface ] != "" ) ) do={
:log facility=Wireless-Info message=( $iface . ": resetting interface!" )
/ interface wireless disable $iface
/ interface wireless enable $iface
:delay 5s
:if ( [ / interface wireless get $iface running ] = true ) do={ :log facility=Wireless-Info message=( $iface . " is now running" ) }
/ tool e-mail send to=[ / tool e-mail get from ] from=( " <" . [ / tool e-mail get from ] . ">" ) subject=( "enforcer: interface " . $iface . "-reset, no running on-" . [ / system identity get name ] . " (" . [ / system clock get time ] . " " . [ / system clock get date ] . ")" )
}
}
 
User avatar
raivis-v
Frequent Visitor
Frequent Visitor
Posts: 55
Joined: Thu Jul 14, 2005 10:21 am
Location: Latvia, Riga

Re: interface running check

Thu Nov 24, 2005 3:50 pm

Script you have posted is written on routerOS v 2.8, but RB 500 series runs routerOS v 2.9.
Scripts difers between these versions of routerOS. So you will have to update your script.

Who is online

Users browsing this forum: baragoon and 14 guests