Page 1 of 1

Netwatch-Like Function

Posted: Sun Jun 14, 2015 12:36 am
by rkelly1
Any thoughts about including a M/T Netwatch-like capability where if a port went up/down, the switch could send an email alert? Remote monitoring by W/S is a little different. We use the heck out of the feature in M/T.

Re: Netwatch-Like Function

Posted: Mon Jun 15, 2015 2:41 pm
by rkelly1
No thoughts on this, Chris?

Re: Netwatch-Like Function

Posted: Mon Jun 15, 2015 4:09 pm
by sirhc
I am mulling it over.

So you are saying you want the switch to send an SMTP message if the port goes up or down?

Re: Netwatch-Like Function

Posted: Mon Jun 15, 2015 4:33 pm
by rkelly1
I was thinking more like an email (and can direct the email to be sent to sms via email). On Tic, under "Netwatch" , one can create an entry for an ip address (may want to monitor the far side of a link) and then you can write a script for what happens on down, and what happens on up. On MT it can be as simple as sending an email or sms via email, or changing a route if an ip on a link goes down. The alert in each entry can be setup via the script to be sent to any email, independent of the device global email address entry.

On WS, it would be nice to have the ability to send an alert on ip address up or down. It's kind of like watchdog without unpowering anything and configurable email destination.

Here is an entry from a MT router that we use as a switch (soon to be replaced by DC Netonix!).
comments are not part of the script. It does use the email credentials from the global device entry but they can be input here also. On "down", it executes the "/tool email" commands.


/* ON DOWN sends to email */
/tool e-mail send server=64.233.177.109 port=587 start-tls=yes from=Netwatch@xxxinternet.com to=email@xxxinternet.com subject="192.xxx.xxx.152 IS DOWN" body=("192.xxx.xxx.152 IS DOWN from ".[/system clock get date]." ".[/system clock get time])
/log info "192.xxx.xxx.152 IS DOWN"
/* sends to sms */
/tool e-mail send server=64.233.177.109 port=587 start-tls=yes from=Netwatch@xxxinternet.com to=cellphonenumber@vtext.com subject=("192.xxx.xxx.152 IS DOWN from ".[/system clock get date]." ".[/system clock get time])

edit/add: in the "setup screen" when adding a new host to monitor, you can enter the timeout (ms) before sending alert, and the ping interval to the host (sec). When state changes, only one alert is sent...nothing is sent again until another state change.

Re: Netwatch-Like Function

Posted: Mon Jun 15, 2015 5:26 pm
by sirhc
I will put some thought into it but for now we have the ping watchdog which sends an SMTP message if it fails which the address you have configured can be a phone text message address or it can go to your mail server which can have rules to pass it on to the appropriate person.

You can select "None" as the port and just give it an IP to ping which would then not unpower any port and just notify you.