From 0f0a707200a2c26ac50ae1853ab3762fb425b443 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Sun, 13 Jun 2021 08:48:35 +0200 Subject: [PATCH] Improve alerts, and use Spanish --- modules/rhizo_base/files/bin/monitor_bts.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rhizo_base/files/bin/monitor_bts.sh b/modules/rhizo_base/files/bin/monitor_bts.sh index a4916e6..716fb8a 100755 --- a/modules/rhizo_base/files/bin/monitor_bts.sh +++ b/modules/rhizo_base/files/bin/monitor_bts.sh @@ -18,14 +18,14 @@ for bts in "${BTS[@]}" ; do read _c < $_f ((_c++)) echo $_c > $_f - if [ $((_c % 15)) == 0 ] ; then - /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts still not responding to ping (x15)" > /dev/null + if [ $((_c % 24)) == 0 ] ; then + /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts todavia no responde a ping (desde hace $((_c*5/60)) horas)." > /dev/null fi else # And this is a new condition, so initialise counter and alert echo 1 > $_f /usr/local/bin/alert.sh noenc "%F0%9F%98%BF" > /dev/null - /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts not responding to ping" > /dev/null + /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts no responde a ping." > /dev/null fi else # BTS is OK @@ -33,7 +33,7 @@ for bts in "${BTS[@]}" ; do # This is cancelling a previous error condition, Remove counter and alert. rm $_f /usr/local/bin/alert.sh noenc "%F0%9F%98%B8" > /dev/null - /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts responding to ping (again)" > /dev/null + /usr/local/bin/alert.sh "$HOSTNAME: BTS $bts vuelve a responder a ping!" > /dev/null fi fi done