Today two of my servers went down. It turned out, that the datacenter they are hosted in had a slight connectivity hiccup – nothing serious. While I was battling my monitoring system and frantically typed support tickets, I wanted an audible alert if the hosts where reachable again in the meantime.
That’s when I thought of OS X’s text to speech system and devised the following little shell script.
https://gist.github.com/florianbeer/8c1e0a56bc306d603987
It will announce that the host is back up with your configured standard voice as soon as there is a ping response and then quit. Just copy it in your .bashrc
file call it with the desired hostname or IP address, leave it running in a Terminal window in the background and turn up your speakers.
hostup no-panic.at