CheckMulti: Show difference between 2 sapdata disksizes

With libelle or some other db mirroring tool the admin always needs to verify that both sides (active/remote) have the same disksizes or freespace. If the admin forgets to resize the remote site, the mirror might stop working when a redolog with lots of data will be put into the DB.

As of this check the following check_multi plugin:

eeval [ sapdataXX ] = \
$<ACTIVE>_sapdataXX = `check_nrpe -H <hostname> -c check_disksize -a /oracle/<SID>/sapdataXX`;\
$<REMOTE>_sapdataXX = `check_nrpe -H <hostname> -c check_disksize -a /oracle/<SID>/sapdataXX`;\
if ($<ACTIVE>_sapdataXX != $<REMOTE>_sapdataXX) {\
 $? = ($WARNING<<8);\
 $value = $<ACTIVE>_sapdataXX-$<REMOTE>_sapdataXX;\
 return "Diff is $value MB";\
} else {\
 $? = ($OK<<8);\
 return "No difference found";\

# Evaluate Status
# Only warning,critical will be shown
# unknown state will be ignored
state [ UNKNOWN  ] = (1==0)
state [ WARNING ] = COUNT(WARNING) > 0


# easy usage shellscript


size=`df -m $part| tail +2 | awk '{print $2}' | cut -d "." -f1`
echo $size
exit 0

Have fun 🙂

This entry was posted in aix, Nagios, Oracle and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.