Nagios Xi – Cluster Check – Solaris

This is a small script that you can add in Nagios XI /libexec directory that will help you monitor cluster services in any solaris server via Nagios

#!/bin/bash
set -x
progname=`basename $0`

srvcnt=`sudo hastatus -sum | grep ClusterService | grep “ONLINE” | grep -v “$progname” | wc -l`
if [ $srvcnt -ge 1 ]; then
echo “Cluster Service is running”
exit 0;
else

echo “Cluster process are not running”
exit 2;
fi

 

Leave a comment