Community discussions

MikroTik App
 
corriganc
just joined
Topic Author
Posts: 6
Joined: Tue Dec 31, 2019 4:01 pm

Audible Alarm on disconnect

Wed Apr 29, 2020 8:46 pm

Hi there,

I was just wondering if there would be a way to get my RB2011UiAS-RM to produce a continuous, audible noise on one/both of the following scenarios:
1) Network cable disconnected from a specific port
2) Unable to ping 8.8.8.8 for >30 seconds

So that I am instantly alerted to any network downtime?

Thank you.
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: Audible Alarm on disconnect

Fri May 01, 2020 3:25 pm

No, there is not any way!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10240
Joined: Mon Jun 08, 2015 12:09 pm

Re: Audible Alarm on disconnect

Fri May 01, 2020 3:39 pm

Of course it is possible!
You need to write a script that detects the condition and issues a beep command.
And you can schedule this script to run every 30 seconds and perform its action.
I am not going to write this for you, I only want to counter the remark made by @ingdaka.
 
corriganc
just joined
Topic Author
Posts: 6
Joined: Tue Dec 31, 2019 4:01 pm

Re: Audible Alarm on disconnect

Mon May 11, 2020 5:14 pm

Of course it is possible!
You need to write a script that detects the condition and issues a beep command.
And you can schedule this script to run every 30 seconds and perform its action.
I am not going to write this for you, I only want to counter the remark made by @ingdaka.
That's great to hear, thank you!

I'm very new to MikroTik and my general programming experience is quite limited too - I don't suppose you could point me in the direction of some guides or tutorials on similar things that I can adapt into this function? I'm guessing it won't be quite as easy as:
ping 8.8.8.8;
if ping = no reply;
	beep;
	wait 30s;
	ping 8.8.8.8
else:
	wait 30s;
	ping 8.8.8.8
Thank you in advance.
 
patrickmkt
Member Candidate
Member Candidate
Posts: 200
Joined: Sat Jul 28, 2012 5:21 pm

Re: Audible Alarm on disconnect

Thu May 14, 2020 5:23 pm

Go to tools -> Netwatch. Add the IP you want to monitor. Write the script you want for both conditions...

https://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch

Who is online

Users browsing this forum: onnoossendrijver and 106 guests