Following script need to be defined in both nagios comamnds and nrpe agent on the client side
# Copyright (c) 2005 Opengaming Israel, Naor Weissmann
# operations: check if all metastat unitx are operational.
youtput=`metastat |grep -i stat |grep 'State:' |grep -v 'Okay' |wc -l`
if [ $youtput -eq 0 ]; then
RETSTR="OK - All metadevices are stable"
RETSTR="ERROR - Metadevices need Maintainence"