mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2026-02-05 22:55:17 +01:00
check_dataprotector added
This commit is contained in:
24
check_dataprotector/trunk/check_dp_mountrequest
Executable file
24
check_dataprotector/trunk/check_dp_mountrequest
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
OUTPUT=$(/opt/omni/bin/omnistat)
|
||||
RESULT=$?
|
||||
|
||||
echo $OUTPUT | grep -q "No currently running sessions."
|
||||
RESULT=$?
|
||||
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
echo "OK - No running sessions"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo $OUTPUT | grep -q "Mount Request"
|
||||
RESULT=$?
|
||||
|
||||
if [ $RESULT -eq 0 ]; then
|
||||
echo "Warning, Dataprotector has mount requests"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n $OUTPUT
|
||||
exit 0
|
||||
Reference in New Issue
Block a user