mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
cleanup added
This commit is contained in:
parent
f4e0637fef
commit
c5c02a0b73
@ -21,15 +21,18 @@ PERFDATA="'active sessions'=$RUNNING_SESSIONS 'queued'=$QUEUED_SESSIONS 'mount r
|
|||||||
grep -q "No currently running sessions." $TEMPFILE
|
grep -q "No currently running sessions." $TEMPFILE
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
|
|
||||||
|
grep -q "Mount" $TEMPFILE
|
||||||
|
MOUNTREQUESTS=$?
|
||||||
|
|
||||||
|
rm -f $TEMPFILE
|
||||||
|
|
||||||
if [ $RESULT -eq 0 ]; then
|
if [ $RESULT -eq 0 ]; then
|
||||||
echo "OK - No running sessions | $PERFDATA"
|
echo "OK - No running sessions | $PERFDATA"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grep -q "Mount" $TEMPFILE
|
|
||||||
RESULT=$?
|
|
||||||
|
|
||||||
if [ $RESULT -eq 0 ]; then
|
if [ $MOUNTREQUESTS -eq 0 ]; then
|
||||||
echo "Warning, $MOUNT_REQUESTS mount requests. $RUNNING_SESSIONS active sessions. $QUEUED_SESSIONS queued. | $PERFDATA"
|
echo "Warning, $MOUNT_REQUESTS mount requests. $RUNNING_SESSIONS active sessions. $QUEUED_SESSIONS queued. | $PERFDATA"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user