This script monitors that server host names or IP address in hostlist and send messages to the server admins.
#!/bin/bash
cat hostlist | while read line
do
pingcount=$(ping -c 1 $line |grep received|awk -F',' '{print $2}'|awk '{print $1}')
if [ $pingcount -eq 0 ]; then
/usr/bin/wall "$line is unreachable, please check and reboot"
fi
done