Sleds/utils/nagios-conf/check_bugbot.sh

17 lines
493 B
Bash

#!/bin/bash
# Scriptname = check_bugbot.sh
export IONUHOME="/ionu"
bottest=`/sequencelogic/bin/robot.sh com.ionu.nikki.TestBot --user=testbot --password=madman12 --health-check=urn:sl:000000:00000005:: --no-console | grep "\[OK\] Health of urn:sl:000000:00000005:: is good" | sed 's/\[//' | sed 's/]//' |awk '{print $1}'`
status=$?
echo "check bugbot status: $status, result is $bottest"
if [ "$bottest" = "OK" ]; then
echo "Bugbot is happy"
exit 0
else
echo "Bugbot is unhappy"
exit 1
fi