]> arthur.barton.de Git - nagcollect.git/blob - client/lib/tests/Disks.tst
0c0451cb2e5be1614b538b9ed1b593266592692b
[nagcollect.git] / client / lib / tests / Disks.tst
1 # NagCollect -- Nagios Data Collector for Passive Checks
2 # Copyright (c)2009 Alexander Barton, alex@barton.de
3
4 if [ `uname` = "Darwin" ]; then
5         SERVICE="Disks_p"
6         error=`LC_ALL=C grep "I/O" /var/log/system.log | tail -n 1`
7         if [ -n "$error" ]; then
8                 msg=`echo $error | cut -d' ' -f6-`
9                 STATUS=2
10                 TEXT="ERROR - $msg"
11         else
12                 STATUS=0
13                 TEXT="OK - No I/O errors detected."
14         fi
15 fi