监控MFS服务器的nagios插件脚本,具体内容如下,有需要的可以在其基础上进行修改。 1#!/bin/bash 2# Nagios return codes 3STATE_OK=0 4STATE_WARNING=1 5STATE_CRITICAL=2 6STATE_UNKNOWN=3 7# Set MFS Path And Warning/CRITICAL Value 8MFS_Path="/usr/sbin" 9MFS_Mount_Point="/mnt/mfs" 10WARNING_Value=85 11CRITICAL_Value=95 12#Get Master server Process 13Master(){ 14MFS_PID=`ps -ef | grep mfsmaster | grep ${mfspath} | awk '{print $2}'` 15if [ "${MFS_PID}" = "" ];then 16 echo "ERROR : mfs master does not start" 17 exit $STATE_CRITICAL 18else 19 echo "OK : mfs master server running OK!" 20 exit $STATE_OK 21fi 22} 23#Get chunker server Process 24Chunker(){ 25MFS_PID=`ps -ef | grep mfschunkserver | grep ${mfspath} | awk '{print $2}'` 26if [ "${MFS_PID}" = "" ];then 27 echo "ERROR :……
Continue reading