Community discussions

MikroTik App
 
Lombart
just joined
Topic Author
Posts: 18
Joined: Mon Mar 05, 2012 11:18 am

RBmAP2nD Detect internet up & down with red LED

Mon Feb 03, 2020 10:57 am

you can detect internet down / up by looking red (POE-Out) LED at RBmAP2nD
only works on RBmAP2nD, maybe useless, but i just want to share :lol:

Preview
Internet Down :
https://pbs.twimg.com/media/EPwlc7vUcAA ... name=large
Internet UP :
https://pbs.twimg.com/media/EPwlc7zUEAA ... name=large

updated, thank you eworm :D

#set LED
/system leds set [find where leds=led3] disabled=yes type=on
 #set script for netwatch
/system script
add dont-require-permissions=yes name=internet-down owner=admin policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
    ":log error \"INTERNET DOWN !!\"\r\
    \n/system leds set disabled=no [find where leds=led3]"
add dont-require-permissions=yes name=internet-up owner=admin policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=\
    ":log warning \"INTERNET UP !!\"\r\
    \n/system leds set disabled=yes [find where leds=led3]" 
#set netwatch to monitor link every 10s
/tool netwatch
add down-script=internet-down host=8.8.8.8 interval=10s up-script=internet-up
 
/
Last edited by Lombart on Mon Feb 03, 2020 1:21 pm, edited 4 times in total.
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1071
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: RBmAP2nD Detect internet up & down with red LED

Mon Feb 03, 2020 11:39 am

You should not use numerical ids in scripts. Never ever! For this case (RB mAP2nD) replace "2" with
[ find where leds=led3 ]
.

This works for every device with configurable leds... A lot devices have these.
 
Lombart
just joined
Topic Author
Posts: 18
Joined: Mon Mar 05, 2012 11:18 am

Re: RBmAP2nD Detect internet up & down with red LED

Mon Feb 03, 2020 11:42 am

You should not use numerical ids in scripts. Never ever! For this case (RB mAP2nD) replace "2" with
[ find where leds=led3 ]
.

This works for every device with configurable leds... A lot devices have these.
thank you eworm :D !
note for myself :D

updated at first post
 
User avatar
eworm
Forum Guru
Forum Guru
Posts: 1071
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: RBmAP2nD Detect internet up & down with red LED

Mon Feb 03, 2020 12:24 pm

You changed just one case, the scripts still have numeric ids.

Who is online

Users browsing this forum: No registered users and 51 guests