Sres. hace muchísimo tiempo que no escribía en este blog, hoy voy a documentar un script para monitorear nuestras tramas E1.
primero creamos nuestro script
[voip@neo script]#>vim e1-alert.sh
#!/bin/bash
ALERTA=$(cat /proc/dahdi/* |grep Span |grep RED)
echo «$ALERTA»
if [ «$ALERTA» ]; then
echo “Caida de Primario” |mail -s Urgente cristiant@gmail.com
fiALERTA=$(cat /proc/dahdi/* |grep Span |grep YELLOW)
echo «$ALERTA»
if [ «$ALERTA» ]; then
echo «Primario Yellow » |mail -s Advertencia cristiant@gmail.com
fiNotas:
«Caida Primario» = Nuestro Body del mensaje.
«Urgente» = Asunto del mensaje.
cristiant@gmail.com = correo del destinatario.
ok, una vez creado nuestro archivo configuramos el cron para correrlo cada x tiempo.
[voip@neo script]#>crontab -e
0,15,30,40 * * * * /script/e1-alert.sh
y listo con esto cada 15 minutos tenemos el chequeo de nuestras tramas..
hasta la proxima.
Thanks for your personal marvelous posting! I certainly enjoyed reading it, you’re a great author. I will make certain to bookmark your blog and may come back later on. I want to encourage you to continue your great posts, have a nice holiday weekend!
Thank you for your words, I invite you to see the new blog in http://www.reyco.cl