MikroTik Tutorial 72 - Monitor network links using Netwatch

Ғылым және технология

Learn MikroTik RouterOs Tutorial Series (english)
In this tutorial I will show you how to monitor your network links using netwatch. This feature can be used to monitor your internet or local area connections.
Script:
/tool netwatch
add down-script=":global myVarDownTime
\

:set myVarDownTime \"\$[/system clock get time]\"
\

:log error \"WAN link is down\"" host=8.8.8.8 up-script=":global myVarDo\
wnTime
\

:log error \"WAN link is up again\"
\

/tool e-mail send to=\"YourEmailAddress@gmail.com\" subject=\"\$[/sy\
stem identity get name] WAN Link is up on \$[/system clock get time]. Down\
\_from \$myVarDownTime\""
Mikrotik supported devices
---------------------------------------------
RB951Ui-2nD,hAP
RB3011UIAS-RM
RB2011UiAS-2HnD-IN
RB750Gr2
hEX,RB750Gr3
RB2011iLS-IN
CRS109-8G-1S-2HnD-IN
hAP lite
hAP ac mAP
wAP
RB951Ui-2HnD
RB951G-2HnD
RB2011UiAS-2HnD-IN
RB941-2nD-TC
RB2011iL-RM
RB2011UiAS-IN
RB2011UiAS-RM
RB1100AHx4
CCR1009-7G-1C-PC
CCR1009-7G-1C-1S+PC
LDF 5
SXTsq Lite5
DISC Lite5
SXT Lite2
SXTsq 5 ac
LHG 2
Groove 52
LHG 5
LHG XL 2
LHG HP5
SXT 2
LHG
OmniTIK 5
BaseBox
wAP 60G,SEXTANT G
OmniTIK 5
mANTBox
QRT
DynaDish

Пікірлер: 70

  • @srinivasareddysomireddy454
    @srinivasareddysomireddy4545 жыл бұрын

    It is Very Useful , Thanks

  • @lkfng
    @lkfng6 жыл бұрын

    Big up yourself sir, keep the videos coming.​

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    You are welcome

  • @PinoyTechTutorials
    @PinoyTechTutorials3 жыл бұрын

    You are wonderful!

  • @dimasfaqihuddin989
    @dimasfaqihuddin9892 жыл бұрын

    very helpful, it is posibble if netwatch give notification on email by hourly while the host target still down ? , its kind like reminder , thanks

  • @pakonline
    @pakonline4 жыл бұрын

    nice video what i want to know is there any option we can create Nwatch Monitoring for specific interface as i have 3 Wan in my case ...Wan1 wan2 and wan3 i want if only wan 1 goes down then generate a log error or when its up then generate email is it possible ?

  • @mikrotikwarlock608
    @mikrotikwarlock6085 жыл бұрын

    very helful thank u so much

  • @formi7916
    @formi79163 жыл бұрын

    His videos worth a subscribe .. Thumbs up!

  • @TKSJa

    @TKSJa

    3 жыл бұрын

    Thanks!

  • @AliMirjamali
    @AliMirjamali6 жыл бұрын

    Thank very much for the video. This was really useful. I added a global variable in "Down" script to store the time when the link goes down and reused it in "Up" script for e-mail notification.

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Cool, could you share your script?

  • @AliMirjamali

    @AliMirjamali

    6 жыл бұрын

    Sure. Here the script I used: /tool netwatch add down-script=":global myVarDownTime \ :set myVarDownTime \"\$[/system clock get time]\" \ :log error \"WAN link is down\"" host=8.8.8.8 up-script=":global myVarDo\ wnTime \ :log error \"WAN link is up again\" \ /tool e-mail send to=\"ali.mirjamali@gmail.com\" subject=\"\$[/system id\ entity get name] WAN Link is up on \$[/system clock get time]. Down from \ \$myVarDownTime\""

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Thank for sharing. It works like a charm.

  • @DuskoMandic

    @DuskoMandic

    2 жыл бұрын

    @@TKSJa doesn’t work anymore. They have changed permissions for Netwatch and now it can not set global variables or read them. Need to set scripts in system/scripts, have them with “Don’t require permissions” enabled and call them from Netwatch

  • @Stephen_M02

    @Stephen_M02

    Жыл бұрын

    @@DuskoMandic Thanks so much for posting this - I was able to use this to implement an ISP downtime monitor, and really wanted it to be able to email me with the timestamp that it went down at, when it came back up.

  • @muhammadjahirulislam8283
    @muhammadjahirulislam82834 жыл бұрын

    I have two WAN link from different ISP. So I have configured it PCC load balance with fail over. When my primary link getting down I want to get notification for this particular link. In this vedio you have configured to it using a single WAN link. How could i do this?

  • @Rouly88
    @Rouly886 жыл бұрын

    I was looking for this Netwatch.. Tks à lot

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    You are welcome

  • @breakena

    @breakena

    6 жыл бұрын

    TKSJa can i get a email address for you

  • @luanboraj6350
    @luanboraj63505 жыл бұрын

    hello friend I followed your guide to monitor the ADSL connection and an NSM5 antenna connected in the network that I use as AP, Mikrotik logs is seen when the connection is missing or when I remove the M5 but I receive no email (email setting OK tested) can you tell me where I'm wrong? I have pravo to write on Netwatch what you wrote but it does not go, I tried to load the script you put in the description for the terminal charging as incorrect, you can help me Thanks

  • @johndeoresearch2251
    @johndeoresearch22514 жыл бұрын

    How can you send email when internet is down?

  • @albaniannature9578
    @albaniannature95785 жыл бұрын

    Can you help me with a script that will disable and enable dhcp client when the ping to 8.8.8.8 is down? thank you

  • @andikadioey4680
    @andikadioey46806 жыл бұрын

    great i am using telegram and netwatch for monitoring, hope it will be on your next video :)

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    I have never used telegram, hope you could share how you send messages from your router to telegram.

  • @Answerx32
    @Answerx329 ай бұрын

    Don't you need to set up the Email server on the router to be able to send emails?

  • @lkfng
    @lkfng6 жыл бұрын

    Do you have any videos about how to set up​ a hotspot from scratch?

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Here is the Hotspot playlist kzread.info/dash/bejne/lHyTmK-MabfFnpc.html

  • @pcplacegr
    @pcplacegr6 жыл бұрын

    Awesome! Very helpful man! One question! I am not getting the "from" time value... Do I have to change anything?

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    I notice that it stop working since the last update. I will have to investigate.

  • @AhmedAbbas76
    @AhmedAbbas76 Жыл бұрын

    I think this method is useful for your internal servers to keep monitoring everything is UP and if one of your servers is down you will know that by checking your mail but it useless for testing your wan interface cuz you may have a tow or three wan interfaces

  • @MSIZAR
    @MSIZAR4 жыл бұрын

    Thank you for the video very helpful as always, the email shows = WAN Link is up on 22:38:51. Down from, How can i make it show the down time on the email ?

  • @AhmedAbbas76

    @AhmedAbbas76

    Жыл бұрын

    no way cuz there is no connection but it depends on your ping from outside to your firewall using your static ip if no replay so the link is down

  • @seanyoung5978
    @seanyoung59786 жыл бұрын

    Hi. Thanks for these tutorials, they have helped a lot. I would like to know how to setup a 3G USB modem for backup.

  • @geraldallaire9904

    @geraldallaire9904

    6 жыл бұрын

    Me too I would like to know how to setup a 3G USB modem for backup. on my RB2011UiAS-2HnD-IN

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    You are welcome. I don't have a 3G modem, but you could take a look at this wiki.mikrotik.com/wiki/Category:3G

  • @SBRTELECOMPVTLTDFarukhNagar
    @SBRTELECOMPVTLTDFarukhNagar3 жыл бұрын

    Please Suggest SFP Port Down Alarm system in microtik Thankyou in Advance TKSJa

  • @utube3939
    @utube39394 жыл бұрын

    Hi bro! Plz make video when hotspot user login or logout then microtik send ua email

  • @KhanSharief
    @KhanSharief4 жыл бұрын

    how can it send email when internet is down?

  • @S4Simple

    @S4Simple

    4 жыл бұрын

    It can send but remove global variable since they dont work in netwatch tool.

  • @TKO67
    @TKO672 жыл бұрын

    breddren bigup

  • @jekk22
    @jekk226 жыл бұрын

    Hello I'd like to integrate netwatch with telegram. you can tell me how to set it so that using the bot id I get the notification when the link goes down. thank you

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    I have never used telegram.

  • @user-ol2ms2xi2b

    @user-ol2ms2xi2b

    4 жыл бұрын

    You can use this replace the $$$$ by your bot token and @@@@ by your chat I'd and ???? The text you want /tool fetch url="api.telegram.org/bot$$$$$$$$$$$$$$$$$$/sendMessage?chat_id=@@@@@@@&text=?????" keep-result=no;

  • @SaidulHassan
    @SaidulHassan6 жыл бұрын

    I want to monitor 2 different ISP link; in a failover load balance setup. How do I setup hosts in Netwatch? @TKSJa

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Netwatch pings an IP address and is not concerned with the interface that it goes through. So I am not sure how that would work.

  • @SaidulHassan

    @SaidulHassan

    6 жыл бұрын

    Thanks +TKSJa I was afraid this was the case. So what tool/method I can use to get alert when one of my ISP is down? I mean the physical link is up but internet is inaccessible? Btw, could you please place all your tutorial scripts here tksja.com/downloads/ so we can download, save, import directly.

  • @SyakirIshak

    @SyakirIshak

    5 жыл бұрын

    Have you found your solution for this? I'm having the same problem.

  • @saomaicns3201
    @saomaicns32014 жыл бұрын

    Mikrotik Team Việt Nam ơi, các bạn có thể làm chủ đề về các thông báo người quản trị khi có sự cố về mất đường wan, mất đường internet, người truy cập bất hợp pháp thành công vào router. Chủ đề về Netwach. Thanks

  • @0912642
    @09126425 жыл бұрын

    When link is down how router send you mail???????

  • @S4Simple

    @S4Simple

    4 жыл бұрын

    Remove global variable since global variable in netwatch script will not be readable by scheduler or other users

  • @ekpesinyang7806
    @ekpesinyang78066 жыл бұрын

    I've configured it but i'm not getting e-mails why ?

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Configure this first: kzread.info/dash/bejne/dYGEp7h7lJfKido.html

  • @leonelchabela9381

    @leonelchabela9381

    5 жыл бұрын

    same with me, did you solved it?

  • @shuchangKuo
    @shuchangKuo5 жыл бұрын

    how to check for mack address?

  • @TKSJa

    @TKSJa

    4 жыл бұрын

    That's very technical

  • @gunchag
    @gunchag3 жыл бұрын

    Is it possible to send e-mail to multiple adresses?

  • @TKSJa

    @TKSJa

    3 жыл бұрын

    Yes, just use a comma. Example "john@abc.com, mary@gmail.com"

  • @gunchag

    @gunchag

    3 жыл бұрын

    @@TKSJa Thank you!

  • @canfz7286
    @canfz72865 жыл бұрын

    if wan link is down how it ll be send mail ?

  • @leonelchabela9381

    @leonelchabela9381

    5 жыл бұрын

    not possible to send

  • @jefftee448

    @jefftee448

    5 жыл бұрын

    If you have a 2nd WAN link, it can.

  • @abbasmikrotik1635
    @abbasmikrotik1635 Жыл бұрын

    Internet connection when the electricity is disconnected

  • @Rouly88
    @Rouly886 жыл бұрын

    Make watchdog video

  • @TKSJa

    @TKSJa

    6 жыл бұрын

    Adding it to my list

  • @Rouly88

    @Rouly88

    5 жыл бұрын

    Please how to use this tutorial for monitoring Local networks

  • @hugohelvio2076
    @hugohelvio20763 жыл бұрын

    2 wan link how?

  • @TKSJa

    @TKSJa

    3 жыл бұрын

    kzread.info/dash/bejne/eZmp17B-Y6i2cqQ.html