On Friday 09 July 2004 02:14, mabergh@boystown.com.au wrote:
Leendert Meyer
wrote on 09/07/2004 08:59:55 AM: On Friday 09 July 2004 00:45, mabergh@boystown.com.au wrote:
Dear Friends,
Can someone please suggest some software or a script etc. that will
ping
servers and send an alert message (via email) if the host is
unreachable
(crashed).
That's basic script programming.
man bash man ping man mail
#! /bin/sh
H='10.0.0.2' ping -q -c 1 $H &> /dev/null || echo "Host $H died" | mail root -s "Host $H died"
RTFM? Thanks. I knew there was a tool somewhere on the list.
Two lines more, and make H a space-separated list of host/ip#; make a cron job that calls the script, and I think you're done. ;) HH="10.0.0.2 10.0.0.3" for H in $HH; do ping ..... done Cheers, Leen