#!/bin/bash
WARN_COUNT=$1
CRIT_COUNT=$2
SCRATCH_TMP=`/usr/openv/volmgr/bin/vmquery -b -pn Scratch_pool | wc -l`
SCRATCH_COUNT=$[$SCRATCH_TMP - 3]
if [ $SCRATCH_COUNT -lt $WARN_COUNT ];then
if [ $SCRATCH_COUNT -lt $CRIT_COUNT ];then
echo "Scratch count CRITICAL : availbale scratch tapes $SCRATCH_COUNT less then $CRIT_COUNT|scratch=$SCRATCH_COUNT;$WARN_COUNT;$CRIT_COUNT"
exit 2
else
echo "Scratch count WARNING : available scratch tapes $SCRATCH_COUNT less then $WARN_COUNT|scratch=$SCRATCH_COUNT;$WARN_COUNT;$CRIT_COUNT"
exit 1
fi
else
echo "Scratch count OK : available scratch tapes $SCRATCH_COUNT|scratch=$SCRATCH_COUNT;$WARN_COUNT;$CRIT_COUNT"
exit 0
fi
exit 3
Now our nice nagios installation will warn me when I need to do something , so I just need to wait for a mail to take action, instead of having to remember each morning to look at those mails. find the "Scratch pool" look at the tape count.
3 comments:
I am in fact thankful to the owner of this site who has shared this wonderful piece of writing at at this place.
Also visit my web page; pirater un compte facebook
My partner and I stumbled over here coming from a different web address and thought I should check things out.
I like what I see so i am just following you. Look forward to checking out your web page again.
Have a look at my web page - Generateur de Code PSN
What's up, after reading this amazing post i am too happy to share my know-how here with mates.
Here is my weblog: Microsoft Office Gratuit
Post a Comment