Xen

check_xen

Description:

Checks a xen virtual host to make sure it is up and running

Current Version

Last Release Date

June 18, 2009

Compatible With


Project Files
Project Notes
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.
Reviews (2) Add a Review
More changes
by mhd-ali, April 30, 2013

- 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



Needs a patch
by DaB., February 28, 2013

--- 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"



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
2.5 (2)
Favorites
0
Views
96,157