3 # NagCollect -- Nagios Data Collector for Passive Checks
4 # Copyright (c)2009-2011 Alexander Barton, alex@barton.de
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 # Please read the file COPYING, README and AUTHORS for more information.
17 echo "Usage: $NAME <scriptname>"
20 if [ `id -u` -ne 0 ]; then
21 echo "$NAME must be run as root!"
25 if [ -r /usr/local/lib/nagcollect/"$1.tst" ]; then
26 tst=/usr/local/lib/nagcollect/"$1.tst"
27 elif [ -r /usr/local/lib/nagcollect/`uname`/"$1.tst" ]; then
28 tst=/usr/local/lib/nagcollect/`uname`/"$1.tst"
30 echo "$NAME: script \"$1\" not found!"
34 SERVICE=""; STATUS=""; TEXT=""
35 echo "Checking \"$tst\" ..."
37 echo "RESULT: $SERVICE=$STATUS \"$TEXT\""