Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
#!/bin/bash

COLUMN=PaceMaker			
COLOR=green				
MSG="Testing Quorom and Floating IP of Galera Cluster" 

# Get PCS Status
pcslog="/tmp/pcs.status"
rm $pcslog
pcs status >> $pcslog

quorum="$(cat $pcslog | grep "with quorum")"
vip="$(cat $pcslog | grep IPaddr2 | grep Started)"
cmd="$(cat $pcslog)"

if [ -z "$quorum" ] || [ -z "$vip1" ] 

then

COLOR=red
MSG="${MSG}
FAILED
""
"${cmd}"
"
else

MSG="${MSG}
SUCCESS
""
"${cmd}"
"
fi

# Leave the rest of script alone
# Tell Xymon about it
$XYMON $XYMSRV "status $MACHINE.$COLUMN $COLOR `date`

${MSG}
"

exit 0

rm $pcslog

...