Fixed typos and rearranged help a bit
This commit is contained in:
@@ -8,6 +8,7 @@ message=""
|
||||
tag="exclamation"
|
||||
priority="3"
|
||||
state=""
|
||||
testMode=""
|
||||
|
||||
case "$NAGIOS_NOTIFICATIONTYPE" in
|
||||
PROBLEM) tag="bangbang";;
|
||||
@@ -45,10 +46,21 @@ do_service() {
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
-t|--type) alertType="$2"; shift 2;;
|
||||
--test) testMode="true"; shift 1;;
|
||||
*) shift 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$testMode" ]; then
|
||||
NAGIOS_NOTIFICATIONTYPE="Test"
|
||||
NAGIOS_HOSTNAME="FakeHost"
|
||||
NAGIOS_HOSTSTATE="OK"
|
||||
NAGIOS_SERVICEDESC="FakeService"
|
||||
NAGIOS_HOSTALIAS="FakeHostAlias"
|
||||
NAGIOS_SERVICESTATE="OK"
|
||||
NAGIOS_LONGDATETIME="Today"
|
||||
fi
|
||||
|
||||
case "$alertType" in
|
||||
h|host|host) do_host;;
|
||||
s|svc|service) do_service;;
|
||||
|
||||
Reference in New Issue
Block a user