<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thank you!<br>
<br>
getting the following error when the host times out:<br>
<br>
Cannot parse address `down”' (while expanding `down”'): Malformed
email address<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 10/24/2013 10:27 AM, Harry Penner
wrote:<br>
</div>
<blockquote
cite="mid:CAE95qKx-tzJf4h9x=BR9Jk5Vb0L_F03W8Oz4MuTBG3Bn1iYfiA@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true" href="tel:952.955.7766"
value="+19529557766" target="_blank">952.955.7766</a><br>
<br>
Sent from My Desktop<br>
<br>
_______________________________________________<br>
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>
<a moz-do-not-send="true"
href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>
<a moz-do-not-send="true"
href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list"
target="_blank">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
-- <br>
This message has been scanned for viruses and
<br>
dangerous content by
<a moz-do-not-send="true" href="http://www.mailscanner.info/"><b>MailScanner</b></a>,
and is
<br>
believed to be clean.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
<a class="moz-txt-link-abbreviated" href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Raymond Norton
LCTN
952.955.7766
Sent from My Desktop</pre>
</body>
</html>