To install this script globally just run the following command:
wget -NP https://gist.githubusercontent.com/arthurafarias/6c882d324b7238bc0b7dded02a9350e2/raw/95a3d9d81a49811fdba9c2d84c925b58a2f7b3b3/check-server-up.sh /usr/local/bin/check-server.sh
check-server.sh -i 1 -c 200 -a [email protected] -u http://google.com -m "Google is Up"
check-server.sh -i 1 -c 500 -a [email protected] -u http://google.com -m "Google is Down"