|
|
|
@ -28,6 +28,12 @@ get_profile.sh.gz: get_profile.sh
|
|
|
|
gzip -f -9 --keep $<
|
|
|
|
gzip -f -9 --keep $<
|
|
|
|
chmod 644 $@
|
|
|
|
chmod 644 $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test-stats:
|
|
|
|
|
|
|
|
test -x /usr/local/nagios/bin/nagiostats
|
|
|
|
|
|
|
|
@echo "### Checking stats:"
|
|
|
|
|
|
|
|
./napi --stats
|
|
|
|
|
|
|
|
@echo ""
|
|
|
|
|
|
|
|
|
|
|
|
test: napi
|
|
|
|
test: napi
|
|
|
|
@echo "### Checking HGM:"
|
|
|
|
@echo "### Checking HGM:"
|
|
|
|
./napi -t hgm -hg arrs -o i -o h -v | head -5
|
|
|
|
./napi -t hgm -hg arrs -o i -o h -v | head -5
|
|
|
|
@ -35,47 +41,45 @@ test: napi
|
|
|
|
@echo "### Checking -Q -f .output:"
|
|
|
|
@echo "### Checking -Q -f .output:"
|
|
|
|
./napi -Q -f .output | head -5
|
|
|
|
./napi -Q -f .output | head -5
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "Checking file sizes for current and save/file:"
|
|
|
|
@echo "### Checking file sizes for current and save/file:"
|
|
|
|
./napi --save asdhjadkajthksdfga.json -v | head -5
|
|
|
|
./napi --save asdhjadkajthksdfga.json -v | head -5
|
|
|
|
./napi | wc
|
|
|
|
./napi | wc
|
|
|
|
./napi --file asdhjadkajthksdfga.json | wc
|
|
|
|
./napi --file asdhjadkajthksdfga.json | wc
|
|
|
|
rm -f asdhjadkajthksdfga.json
|
|
|
|
rm -f asdhjadkajthksdfga.json
|
|
|
|
@echo ""
|
|
|
|
test -x /usr/local/nagios/bin/nagiostats && make test-stats
|
|
|
|
@echo "Checking stats:"
|
|
|
|
|
|
|
|
./napi --stats
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENVtest1="MySQL Check: myDatabase performance"
|
|
|
|
ENVtest1="MySQL Check: myDatabase performance"
|
|
|
|
ENVtest2="Disk Usage on / 80 90"
|
|
|
|
ENVtest2="Disk Usage on / 80 90"
|
|
|
|
ENVtest3="One Two: Three - Four 5 6"
|
|
|
|
ENVtest3="One Two: Three - Four 5 6"
|
|
|
|
test-env: ENV
|
|
|
|
test-env: ENV
|
|
|
|
@echo "This should give $(ENVtest1)"
|
|
|
|
@echo "### This should give $(ENVtest1)"
|
|
|
|
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test
|
|
|
|
@NAGIOS_TEST=$(ENVtest1) ./ENV -n test
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "This should give / then 80 then 90 then |"
|
|
|
|
@echo "### This should give / then 80 then 90 then |"
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 2
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 2
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 3
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 3
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1 -p
|
|
|
|
NAGIOS_TEST=$(ENVtest2) ./ENV -n test -F 1 -p
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "This should give Check, then myDatabase, then myDatabase performance, then MySQL Check"
|
|
|
|
@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 2
|
|
|
|
NAGIOS_TEST=$(ENVtest1) ./ENV -n test -f 4
|
|
|
|
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
|
|
|
|
NAGIOS_TEST=$(ENVtest1) ./ENV -n test -d : -f -2
|
|
|
|
NAGIOS_TEST=$(ENVtest1) ./ENV -n test -d : -f -2
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "This should give Password"
|
|
|
|
@echo "### This should give Password"
|
|
|
|
NAGIOS_TEST=$(ENVtest1) NAGIOS__HOSTMYDATABASEPASS=Password ./ENV -n test -f -2 -HT pass
|
|
|
|
NAGIOS_TEST=$(ENVtest1) NAGIOS__HOSTMYDATABASEPASS=Password ./ENV -n test -f -2 -HT pass
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "Test string is: $(ENVtest3)"
|
|
|
|
@echo "### Test string is: $(ENVtest3)"
|
|
|
|
@echo "The first test should be the full test line, then blank line, then number 5, then FourToken twice"
|
|
|
|
@echo "### The first test should be the full test line, then blank line, then number 5, then FourToken twice"
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n TeSt
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n TeSt
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n TEST -F 2 -S 5
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n TEST -F 2 -S 5
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n test -F 2 --num
|
|
|
|
NAGIOS_TEST=$(ENVtest3) ./ENV -n test -F 2 --num
|
|
|
|
NAGIOS_TEST=$(ENVtest3) NAGIOS__HOSTFOURTOKEN="FourToken" ./ENV -H -n fourtoken
|
|
|
|
NAGIOS_TEST=$(ENVtest3) NAGIOS__HOSTFOURTOKEN="FourToken" ./ENV -H -n fourtoken
|
|
|
|
NAGIOS_TEST=$(ENVtest3) NAGIOS__HOSTFOURTOKEN="FourToken" ./ENV -n test -F 1 -HT TOKEN
|
|
|
|
NAGIOS_TEST=$(ENVtest3) NAGIOS__HOSTFOURTOKEN="FourToken" ./ENV -n test -F 1 -HT TOKEN
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "This should return Level2"
|
|
|
|
@echo "### This should return Level2"
|
|
|
|
NAGIOS__HOSTNCPAPASS="Level2" ./ENV set.txt -n asdf -T NCPAPASS
|
|
|
|
NAGIOS__HOSTNCPAPASS="Level2" ./ENV set.txt -n asdf -T NCPAPASS
|
|
|
|
@echo ""
|
|
|
|
@echo ""
|
|
|
|
@echo "This should return Balloons, 91, Red"
|
|
|
|
@echo "### This should return Balloons, 91, Red"
|
|
|
|
NAGIOS_TEST="HTTP -S 8099" ./ENV set.txt -n TEST -g "8.*" -d 0 -f 2 --pre "Balloons, " --post ", Red"
|
|
|
|
NAGIOS_TEST="HTTP -S 8099" ./ENV set.txt -n TEST -g "8.*" -d 0 -f 2 --pre "Balloons, " --post ", Red"
|
|
|
|
|