File check_disks of Package nagios-plugins-disks (Revision 5b72eddf34cf98357056b4df92e88a8f)
Currently displaying revision 5b72eddf34cf98357056b4df92e88a8f, show latest
1
#!/bin/bash
2
CHECK_MULTI_CMD_FILE="/tmp/check_disks.cmd"
3
CNT=0
4
5
rm -rf ${CHECK_MULTI_CMD_FILE}
6
7
for a in `grep -E '(xfs|ext2|ext3|ext4|btrfs|reiserfs|vfat)' /proc/mounts | awk '{print $1}'` ; do
8
echo "command[check_disk_${CNT}]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p ${a}" >> ${CHECK_MULTI_CMD_FILE}
9
CNT=`expr ${CNT} + 1`
10
done
11
if [ -x /usr/lib/nagios/plugins/check_multi ] ; then
12
/usr/lib/nagios/plugins/check_multi -f ${CHECK_MULTI_CMD_FILE} -s dont_be_paranoid=1
13
else
14
echo "Plugin: /usr/lib/nagios/plugins/check_multi not executable"
15
exit 2
16
fi
17