This function pings the givem IP once in every 10 mins. When ping succeeds it does echo and gives a bubble notification in ubuntu
function notify_when_on {Add this function to .bashrc and use it as
ping -w1 $1 &> /dev/null
RC=$?
while [ $RC -eq 1 ]
do
sleep 600
ping -w1 $1 &> /dev/null
RC=$?
done
mesg="$1 is ON"
echo ${mesg}
notify-send -i /usr/share/icons/gnome/32x32/apps/gnome-terminal.png "${mesg}"
}
notify_when_on 172.24.56.143