I would like to set up a ping monitor for a device on my network. The ping should be every half hour or so. If the ping fails, the script would send me an email. Are there any examples of this?
Thanks.
I would like to set up a ping monitor for a device on my network. The ping should be every half hour or so. If the ping fails, the script would send me an email. Are there any examples of this?
Thanks.
Use netwatch.
Is that the best way to do it? I don’t mind learning the best way even if it takes more work. Thanks.
As already said, netwatch.
Just add a down-script that does the email. Here’s one to directly paste into terminal (just replace the value of “host” with your host, and the email address involved):
/tool netwatch add interval=30m timeout=5s host=192.168.0.100 down-script=“/tool e-mail send to="me@mymailbox.com" subject="Host down!" body="The host 192.168.0.100 is down!"”
Thanks for the help. I tried to input what you suggested, but the email portion doesn’t seem to be working. Do I have to do anything else besides enter my email address? I don’t have email configured anywhere else in the router.
Thanks.
I figured it out. In your post you have quotes around the send to email address. That is the problem. You can’t have quotes around the email address. Once I removed them, everything worked fine.
Thanks for the help.