Updated Makefile with ENV tests and updted ENV to pull SERVICE: NAME WARN CRIT values with -F
This commit is contained in:
@@ -43,3 +43,32 @@ test: napi
|
||||
@echo ""
|
||||
@echo "Checking stats:"
|
||||
./napi --stats
|
||||
|
||||
ENVtest1="MySQL Check: myDatabase performance"
|
||||
ENVtest2="Disk Usage on / 80 90"
|
||||
ENVtest3="One Two: Three - Four 5 6"
|
||||
test-env: ENV
|
||||
@echo "This should give $(ENVtest1)"
|
||||
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test
|
||||
@echo ""
|
||||
@echo "This should give / then 80 then 90 then |"
|
||||
@NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1
|
||||
@NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 2
|
||||
@NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 3
|
||||
@NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1 -p
|
||||
@echo ""
|
||||
@echo "This should give Check, then myDatabase, then myDatabase performance, then MySQL Check"
|
||||
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test -f 2
|
||||
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test -f 4
|
||||
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test -d : -f 2
|
||||
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test -d : -f -2
|
||||
@echo ""
|
||||
@echo "This should give Password"
|
||||
@NAGIOS_TEST=$(ENVtest1) NAGIOS__HOSTMYDATABASEPASS=Password ./ENV -n test -f -2 -H pass
|
||||
@echo ""
|
||||
@echo "Test string is: $(ENVtest)"
|
||||
@echo "The first test should be the full test line, then blank line, then number 5, then FourToken"
|
||||
@NAGIOS_TEST=$(ENVtest3) ./ENV -n TeSt
|
||||
@NAGIOS_TEST=$(ENVtest3) ./ENV -n TEST -F 2 -S 5
|
||||
@NAGIOS_TEST=$(ENVtest3) ./ENV -n test -F 2 --num
|
||||
@NAGIOS_TEST=$(ENVtest3) NAGIOS__HOSTFOURTOKEN="FourToken" ./ENV -n test -F 1 -H TOKEN
|
||||
|
||||
Reference in New Issue
Block a user