Thank you!

getting the following error when the host times out:

  Cannot parse address `down"' (while expanding `down"'): Malformed 
email address



On 10/24/2013 10:27 AM, Harry Penner wrote:
> You can roll your own fairly easily using a structure like this:
>
> --
> #!/bin/bash
>
> PINGTARGET="myserver"
> PINGEMAIL="me at mydomain.com <mailto:me at mydomain.com>"
> PINGCOUNT=3
> PINGWAIT=60
>
> while [ True ]; do
>   PINGTIME="`date +%D-%T`"
>   if ! [ "`ping -c $PINGCOUNT $PINGTARGET | grep -c 'bytes from'`" -gt 
> "0" ]; then
>     echo "$PINGTIME $PINGTARGET failed $PINGCOUNT pings!"
>     echo "$PINGTIME $PINGTARGET failed $PINGCOUNT pings!" | mail -s 
> "$PINGTARGET is down" $PINGEMAIL
>   else
>     echo "$PINGTIME $PINGTARGET is up"
>   fi
>   sleep $PINGWAIT
> done
> --
>
> If you need SMTP authentication, SSL, etc then you may want to go with 
> something heavier like perl.  Tons of examples on the web...
>
> -HP
>
>
> On Thu, Oct 24, 2013 at 9:22 AM, Raymond Norton <admin at lctn.org 
> <mailto:admin at lctn.org>> wrote:
>
>     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.
>
>     Any ideas?
>
>     -- 
>     Raymond Norton
>     LCTN
>     952.955.7766 <tel:952.955.7766>
>
>     Sent from My Desktop
>
>     _______________________________________________
>     TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
>     tclug-list at mn-linux.org <mailto:tclug-list at mn-linux.org>
>     http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
>
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list

-- 
Raymond Norton
LCTN
952.955.7766

Sent from My Desktop

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20131024/a2c97855/attachment-0001.html>