Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
candreasen
Had to modify the script as shown below so that it wouldn't alarm if one mount was a subset of another (e.g. /mnt/foo and /mnt/foo_new would alarm, saying "/mnt/foo is mounted several times (2)"
Old line 107:
MOUNTED=`mount | grep $MOUNT | grep $FS | wc -l | tr -s " "` # execute the command to check the mount...
New line 107:
MOUNTED=`mount | grep "$MOUNT" | grep " $FS " | wc -l | tr -s " "` # execute the command to check the mount...
Old line 107:
MOUNTED=`mount | grep $MOUNT | grep $FS | wc -l | tr -s " "` # execute the command to check the mount...
New line 107:
MOUNTED=`mount | grep "$MOUNT" | grep " $FS " | wc -l | tr -s " "` # execute the command to check the mount...
Owner's reply
Thanks for the bug report candreasen, I have modified the script with a bug correction and added a small CPU & memory speedup.
Note that your suggested line also won't work correctly in all OS, so i have only put one space after the FS, to act as a delimiter, and removed the space before the FS.
I will post the updated script now.