Correciton options

This commit is contained in:
David 2022-12-19 23:35:36 +01:00
parent 0995be0701
commit d3c5974145

View File

@ -2,9 +2,8 @@
CHECK="/usr/lib/nagios/plugins/check_http"
CHECK_OPTS="-S --sni -H visio.chapril.org"
#CHECK_OPTS="-I 192.168.1.93 -C 30,14"
IP_FRONT='0'
THRESHOLDS='30,14'
IP_FRONT='192.168.1.93'
THRESHOLDS='20,10'
usage() {
echo
@ -29,14 +28,14 @@ while getopts ${optstring} arg; do
exit 1
;;
i)
CHECK_OPTS="${CHECK_OPTS} -I ${OPTARG}"
IP_FRONT="${OPTARG}"
;;
C)
CHECK_OPTS="${CHECK_OPTS} -C ${OPTARG}"
THRESHOLDS="${OPTARG}"
;;
esac
done
res="`${CHECK} ${CHECK_OPTS}`"
res="`${CHECK} ${CHECK_OPTS} -I ${IP_FRONT} -C ${THRESHOLDS}`"
ret=${?}
echo "${res}"
exit ${ret}