]> arthur.barton.de Git - nagcollect.git/commitdiff
Disks.tst: Only check read-write volumes
authorAlexander Barton <alex@barton.de>
Thu, 3 Feb 2011 15:46:03 +0000 (16:46 +0100)
committerAlexander Barton <alex@barton.de>
Thu, 3 Feb 2011 15:46:03 +0000 (16:46 +0100)
client/lib/tests/Disks.tst

index 1ea83a1d3022c99ef71cde4349b299f3764d3b32..c353a3bae2f28d7b52c2776caad6596021739668 100644 (file)
@@ -1,7 +1,7 @@
 # NagCollect -- Nagios Data Collector for Passive Checks
 # Copyright (c)2009-2011 Alexander Barton, alex@barton.de
 
-# Check free space on local filesystems
+# Check free space on local r/w filesystems
 
 SERVICE="DiskUsage_p"
 STATUS=4
@@ -21,6 +21,7 @@ while read x; do
        capacity=`echo $x | cut -d' ' -f5 | sed 's/%//'`
        declare -i capacity2=100-$capacity
        fs=`echo $x | cut -d' ' -f6`
+       [ -w "$fs" ] || continue
        [ -n "$TEXT" ] && TEXT="$TEXT "
        TEXT="${TEXT}${fs} ${free} MB (${capacity2}%);"
        [ "$free" -lt 2000 -a $capacity2 -lt 5 ] && error=1