mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-06 07:05:17 +01:00
check_dataprotector added
This commit is contained in:
28
check_dataprotector/trunk/check_dp_tablespace
Executable file
28
check_dataprotector/trunk/check_dp_tablespace
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
#/opt/omni/bin/omnirpt -report db_size
|
||||
|
||||
echo $USER > /tmp/check_dp_tablespace.debug
|
||||
echo $@ >> /tmp/check_dp_tablespace.debug
|
||||
|
||||
|
||||
OUTPUT=$(/opt/omni/bin/omnirpt -report db_size)
|
||||
RESULT=$?
|
||||
|
||||
if [ $RESULT -gt 0 ]; then
|
||||
echo -n $OUTPUT
|
||||
exit 1
|
||||
fi
|
||||
echo $OUTPUT | grep -q "No database devices with low disk space."
|
||||
|
||||
RESULT=$?
|
||||
|
||||
if [ $RESULT -gt 0 ]; then
|
||||
echo "Warning - Some dataprotector tablespaces are running low"
|
||||
exit 1
|
||||
else
|
||||
echo "OK - No database devices with low disk space."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user