[-]
[+]
|
Changed |
nagios-plugins-disks.changes
|
|
[-]
[+]
|
Changed |
nagios-plugins-disks.spec
^
|
|
[-]
[+]
|
Changed |
check_disks
^
|
@@ -4,12 +4,21 @@
rm -rf ${CHECK_MULTI_CMD_FILE}
-for a in `grep -E '(xfs|ext2|ext3|ext4|btrfs|reiserfs|vfat|tmpfs)' /proc/mounts | awk '{print $1}' | grep ^/` ; do
+for a in `grep -E '(xfs|ext2|ext3|ext4|btrfs|reiserfs|vfat|tmpfs|vzfs)' /proc/mounts | awk '{print $1}' | grep ^/` ; do
echo "command[check_disk_${CNT}]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p ${a}" >> ${CHECK_MULTI_CMD_FILE}
CNT=`expr ${CNT} + 1`
done
if [ -x /usr/lib/nagios/plugins/check_multi ] ; then
- /usr/lib/nagios/plugins/check_multi -f ${CHECK_MULTI_CMD_FILE} -s dont_be_paranoid=1
+ if [ -f ${CHECK_MULTI_CMD_FILE} ] ; then
+ /usr/lib/nagios/plugins/check_multi -f ${CHECK_MULTI_CMD_FILE} -s dont_be_paranoid=1
+ else
+ if [ -x /usr/lib/nagios/plugins/check_disk ] ; then
+ /usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
+ else
+ echo "Couldn't find any valid filesystem to check and i'm unable to execute check_disk plugin"
+ exit 2
+ fi
+ fi
else
echo "Plugin: /usr/lib/nagios/plugins/check_multi not executable"
exit 2
|