Community discussions

MUM Europe 2020
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2438
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

netwatch email script

Tue Apr 15, 2014 5:26 pm

I have try different email scripts as see at the forum but don't work

I have routeros 6.12

I want routerboard send me a email if a host is down

How must i setup this.
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Tue Apr 15, 2014 5:59 pm

Simply configure the email tool and test to make sure it is working. Then use netwatch to monitor the host and send the email. How far have you been able to get?
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2438
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: netwatch email script

Tue Apr 15, 2014 6:18 pm

My email setup is done in tools email.
But i want a working script if the host if down.
Thanks for your reply
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Tue Apr 15, 2014 7:13 pm

/tool netwatch
add down-script="/tool e-mail send to=youremail@gmail.com subject=\"Host is D\
    own\" from=youremail@gmail.com port=587 start-tls=yes user=youremail@g\
    mail.com password=`123456 body=\"Host Down\"" host=192.168.88.1 up-script="\
    /tool e-mail send to=youremail@gmail.com subject=\"Host is Up\" from=\
    youremail@gmail.com port=587 start-tls=yes user=youremail@gmail.com passwo\
    rd=123456 body=\"Host Up\""
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2438
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: netwatch email script

Tue Apr 15, 2014 7:52 pm

Hello, rickfrey i don't need g-mail i send email via port 25
Can you help me?
Thanks for your reply
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Tue Apr 15, 2014 10:04 pm

If you take the above script and enter in your email info, what happens?
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2438
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: netwatch email script

Tue Apr 15, 2014 10:14 pm

No email receive
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Tue Apr 15, 2014 11:46 pm

Then there is something wrong with the email settings you are using or the email service is incompatible with what the MikroTik can do. Why don't you try to create a Gmail account and test it using the above script. You might also want to verify the settings that email clients should use for your service.
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
plisken
Forum Guru
Forum Guru
Topic Author
Posts: 2438
Joined: Sun May 15, 2011 12:24 am
Location: Belgium
Contact:

Re: netwatch email script

Tue Apr 15, 2014 11:57 pm

I will try and let you know.

Many thanks to you.
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Wed Apr 16, 2014 7:00 am

No problem. Hope you get it working :D
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
onowojemma
Member Candidate
Member Candidate
Posts: 129
Joined: Sun Sep 11, 2005 5:27 pm
Location: Nigeria

Re: netwatch email script

Sun Jun 01, 2014 2:10 pm

/tool netwatch
add down-script="/tool e-mail send to=youremail@gmail.com subject=\"Host is D\
    own\" from=youremail@gmail.com port=587 start-tls=yes user=youremail@g\
    mail.com password=`123456 body=\"Host Down\"" host=192.168.88.1 up-script="\
    /tool e-mail send to=youremail@gmail.com subject=\"Host is Up\" from=\
    youremail@gmail.com port=587 start-tls=yes user=youremail@gmail.com passwo\
    rd=123456 body=\"Host Up\""
Hi all tried the above script but don't work show error connecting to server on my log is there any other setting i have to so some were?
kind regards
Mikrotik! making networking easy
 
marizo
newbie
Posts: 33
Joined: Sun May 04, 2014 8:41 pm

Re: netwatch email script

Sun Jun 01, 2014 2:32 pm

first configure e-mail tool:
/tool e-mail set address=173.194.77.108 port=587 from=RB@MT user=yourmail@gmail.com password=yourpass start-tls=yes

then try to send test mail:
/tool e-mail send to=toyourmail@gmail.com subject="test" body="test"
 
onowojemma
Member Candidate
Member Candidate
Posts: 129
Joined: Sun Sep 11, 2005 5:27 pm
Location: Nigeria

Re: netwatch email script

Sun Jun 01, 2014 2:35 pm

Thanks work perfectly well
kind regard
Mikrotik! making networking easy
 
User avatar
rickfrey
Trainer
Trainer
Posts: 610
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: netwatch email script

Mon Jun 02, 2014 4:57 pm

Glad to hear it!
Launch your company forward with professional training!
http://rickfreyconsulting.com/product-c ... raining-2/
 
itsmekadek
just joined
Posts: 1
Joined: Wed Apr 18, 2018 5:42 am

Re: netwatch email script

Wed Apr 18, 2018 5:47 am

first configure e-mail tool:
/tool e-mail set address=173.194.77.108 port=587 from=RB@MT user=yourmail@gmail.com password=yourpass start-tls=yes

then try to send test mail:
/tool e-mail send to=toyourmail@gmail.com subject="test" body="test"
Hello Marizo,
I am very new to mikrotik, please tell me more regarding this syntax here address=173.194.77.108 from=RB@MT. What are their meaning ? For me to be able to adjust them with my condition here.

Thank you very much
Kadek

Who is online

Users browsing this forum: No registered users and 13 guests