Skip to content

Instantly share code, notes, and snippets.

@rubenbruno89
Created December 19, 2017 03:31
Show Gist options
  • Save rubenbruno89/b83f281a552bdd1e3301c1fa5259f1cc to your computer and use it in GitHub Desktop.
Save rubenbruno89/b83f281a552bdd1e3301c1fa5259f1cc to your computer and use it in GitHub Desktop.
Monitorar servidor usando Telegran
#!/bin/bash
clear
echo
if ping -c 4 ucv.edu.br ; then
echo
echo Teste de PING BEM-SUCEDIDO!
else
./telegram 71996032 AVISO O-SITE-DA-UCV-ESTÁ-FORA-DO-AR!
fi
echo
if ping -c 4 google.com ; then
echo
echo Teste de PING BEM-SUCEDIDO!
else
./telegram 71996032 AVISO O-AVA-PRESENCIAL-ESTA-FORA-DO-AR!
fi
echo
if ping -c 4 registro.br ; then
echo
echo Teste de PING BEM-SUCEDIDO!
else
./telegram 71996032 AVISO O-AVA-SEMIPRESENCIAL-DA-UCB-ESTA-FORA-DO-AR!
fi
echo
if ping -c 4 ig.com.br ; then
echo
echo Teste de PING BEM-SUCEDIDO!
else
./telegram 71996032 AVISO O-PORTAL-ACADEMICO-ESTA-FORA-DO-AR!
fi
echo
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment