Email Alert for Host down using fping Rumi, October 26, 2020 A simplified bash script for host status alert: #!/bin/bash email=h.t.emdad@gmail.com NBR_DOWN=0 LOGFILE=/tmp/pinglog.txt echo “Server Down Status” > $LOGFILE for i in $(cat ping.txt); do fping $i >/dev/null if [ $? -ne 0 ]; then echo “$i is down” >> $LOGFILE NBR_DOWN=$((NBR_DOWN+1)) fi done if [ $NBR_DOWN -gt 0 ]; then… Continue Reading