puppet/modules/rhizo_base/files/bin/monitor_bts.sh
Keith Whyte ad320affc2 Add initial BTS monitoring cron job
Integrate the old AMP monitoring script into
something new that can be expanded to run more check and
act on results.
2021-06-09 04:50:08 +02:00

13 lines
303 B
Bash
Executable file

#!/bin/bash
RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
$RHIZO_SCRIPT/monitor_amp.sh
for bts in "${BTS[@]}" ; do
fping -q -c2 -p50 $bts >/dev/null 2>&1
if [ $? == 1 ] ; then
/usr/local/bin/alert.sh "$HOSTNAME: BTS $bts not responding to ping" > /dev/null
fi
done