Tuesday, March 12, 2013
simple website health check script
Original post: http://serverfault.com/questions/176436/simple-web-server-monitoring-alive
wget --timeout=3 --tries=1 http://serverfault.com
if [ $? -ne 0 ];then
echo "Site Down" | mail -s "Site Down" admin@yourdomain.com
fi
to have the mail sent without content just change the mail -s "Site Down" admin@yourdomain.com to
mail -s "Site Down" admin@yourdomain.com
Subscribe to:
Comments (Atom)