Build precise queries to find exactly what you need
Press ESC to close
– use $DATA instead of do the command again in every status – add Shutoff status “because when the virtual host if off it’ll appear nothing”
DATA=`xm list $NAME | tail -1` R=`echo “$DATA” | cut -c 64` B=`echo “$DATA” | cut -c 65` P=`echo “$DATA” | cut -c 66` S=`echo “$DATA” | cut -c 67` C=`echo “$DATA” | cut -c 68` D=`echo “$DATA” | cut -c 69`
if [ -z $R ] || [ -z $B ] || [ -z $B ] || [ -z $P ] || [ -z $C ] || [ -z $D ]; then echo “Critical – Virtual System is Shutoff” exit 2 fi
if [ $R = “r” ] || [ $B = “b” ]; then echo “OK – Virtual System is Up” exit 0 fi
if [ $P = “p” ]; then echo “Warning – Virtual System is Paused” exit 1 fi
if [ $S = “s” ] || [ $C = “c” ] || [ $D = “d” ]; then echo “Critical – Virtual System is Down” exit 2
fi
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!