<div dir="ltr">You can roll your own fairly easily using a structure like this:<div><br></div><div>--</div><div><div>#!/bin/bash</div><div><br></div><div>PINGTARGET="myserver"</div><div>PINGEMAIL="<a href="mailto:me@mydomain.com">me@mydomain.com</a>"</div>
<div>PINGCOUNT=3</div><div>PINGWAIT=60</div><div><br></div><div>while [ True ]; do</div><div> PINGTIME="`date +%D-%T`"</div><div> if ! [ "`ping -c $PINGCOUNT $PINGTARGET | grep -c 'bytes from'`" -gt "0" ]; then</div>
<div> echo "$PINGTIME $PINGTARGET failed $PINGCOUNT pings!"</div><div> echo “$PINGTIME $PINGTARGET failed $PINGCOUNT pings!” | mail -s “$PINGTARGET is down” $PINGEMAIL</div><div> else</div><div> echo "$PINGTIME $PINGTARGET is up"</div>
<div> fi</div><div> sleep $PINGWAIT</div><div>done</div></div><div>--</div><div><br></div><div>If you need SMTP authentication, SSL, etc then you may want to go with something heavier like perl. Tons of examples on the web...</div>
<div><br></div><div>-HP</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 9:22 AM, Raymond Norton <span dir="ltr"><<a href="mailto:admin@lctn.org" target="_blank">admin@lctn.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am googling for a ping program for Ubuntu that sends and email or audio alert if the ping request times out. Needs to run all the time rather than cycle every few minutes.<br>
<br>
Any ideas?<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Raymond Norton<br>
LCTN<br>
<a href="tel:952.955.7766" value="+19529557766" target="_blank">952.955.7766</a><br>
<br>
Sent from My Desktop<br>
<br>
______________________________<u></u>_________________<br>
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>
<a href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>
<a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list" target="_blank">http://mailman.mn-linux.org/<u></u>mailman/listinfo/tclug-list</a><br>
</font></span></blockquote></div><br></div>