Community discussions

MikroTik App
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

send mail after long outage ?

Sun Jun 28, 2015 4:17 pm

I'm using the dude for some time now - and I mange to send a mail when a device disconnect\connect
I want to know can I make the dude send me mail only after a time I will set of unit been disconnect?
for example only when the outage is more them 5 hours it will send me a mail ?

Thanks ,
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: send mail after long outage ?

Mon Jun 29, 2015 11:55 pm

yes.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: send mail after long outage ?

Tue Jun 30, 2015 9:37 am

:-)

can you show me how to do this ? how to config it?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: send mail after long outage ?

Tue Jun 30, 2015 6:53 pm

To create the notification that will be delayed for 5 hours, click on top left, settings button, polling, notification edit list (the dot dot dot button), click +, manually clone "Notification" or which ever one you have that actually works right now and give it a different name. On the Advanced tab set the delay to 5 hours and make sure unstable->Down and Down->Up are checked.

Now you probably have some logic issue since you might want to be notified right when it comes back up but what if it comes back up before sending the 5 hour delayed notification? Well you will have to toy with the idea of making another notification that is only set for Down->Up and changing the 5 hour delay to only Unstable->Down.

Back on the polling tab add a check mark next to the new notification that is delayed 5 hours or set this on a per map or a per device basis. Remember if you set a map or device it no longer accepts the global settings.

Sounds like you will get a notification 5 hours later for a device that came up already... Let us know :)

Lebowski
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: send mail after long outage ?

Wed Jul 01, 2015 4:03 pm

I just want to know that the unit is down for 5 hours , if it that long meaning I have to go and see what is the problem- so I will know it came up.

so this is what I have done
check only:
unstable-->down
up-->down

and gave him delay of 5 hours

so just to be clear -
1. when a unit will go down for 5 hours I will get an E-mail.
2. if the unit return to work after 4.5 hours I will not get nothing,right? (this is good for me)

is my understanding correct?

and 1 last question -
I can also change the time to 1 week ?

Thanks ,
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: send mail after long outage ?

Wed Jul 01, 2015 8:06 pm

I do not know if it works correctly, you will have to do some testing. Devices only go from unstable->down so that is the only check mark you need to get a down message. If you want an up message you need down->up.

If the device goes down and you have set a 5 hour delay I assume you will get a message in 5 hours. This probably works but if the device comes up after being down for 5 hours do you want to wait another 5 hours for the up message?
So create two notifications, one for Down with a 5 hour delay another for Up that will notify you in 10 minutes if the device comes back up. Does that make sense?

Lebowski
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: send mail after long outage ?

Wed Jul 01, 2015 8:15 pm

Actually it is more complicated... Since the probe interval is 30 seconds, One missed probe will cause "unstable' 3 missed probes will cause "down" which will generate a message that will sit in the queue for 5 hours then get send regardless of the current state.

The only way to make this work is to create a custom probe that takes 5 hours to fail and base the messages off of that probe, that means you need to modify the polling interval of the probe. I doubt you want all your probes to be once an hour with 5 failures to cause a transition.

So my first response is wrong. It is not yes, it is it depends.

Yeah monitoring is monitoring...
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1424
Joined: Sun Sep 18, 2011 7:00 pm

Re: send mail after long outage ?

Sun Jul 05, 2015 9:50 am

I'm trying to play with this now and see what goes and if this work

Thanks ,

Who is online

Users browsing this forum: No registered users and 26 guests