Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
Checks a xen virtual host to make sure it is up and running
Current Version
Last Release Date
June 18, 2009
Owner
Nagios Exchange
Compatible With
Check_Xen Shell script
This is a simple plugin that checks the status of the xen virtual host if the status is running or blocking it will return an OK if the status is Paused it will return a Warning if the status is Shutdown, Crashed, or Dieing it will return a Critical If the host does not exist it will return an Unknown. The only option is -m and the virtual host name. This is released under the GNU License Mod it and redistribute it if you like.
- 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
--- check_xen.sh 2013-02-05 16:22:02.000000000 +0000 +++ check_xen.sh.org 2013-02-05 16:19:19.000000000 +0000 @@ -30,12 +30,12 @@ exit 3 fi DATA=`xm list $NAME` -R=`xm list $NAME | tail -1 | cut -c 64` -B=`xm list $NAME | tail -1 | cut -c 65` -P=`xm list $NAME | tail -1 | cut -c 66` -S=`xm list $NAME | tail -1 | cut -c 67` -C=`xm list $NAME | tail -1 | cut -c 68` -D=`xm list $NAME | tail -1 | cut -c 69` +R=`xm list test | tail -1 | cut -c 64` +B=`xm list test | tail -1 | cut -c 65` +P=`xm list test | tail -1 | cut -c 66` +S=`xm list test | tail -1 | cut -c 67` +C=`xm list test | tail -1 | cut -c 68` +D=`xm list test | tail -1 | cut -c 69` if [ $R == "r" ] || [ $B == "b" ]; then echo "OK - Virtual System is Up"
You must be logged in to submit a review.
To:
From: