Ajout sonde check_visio_certificate
This commit is contained in:
parent
46d6abb75e
commit
1b00685ea8
42
monitoring/check_visio_certificate.sh
Executable file
42
monitoring/check_visio_certificate.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#! /bin/sh
|
||||
|
||||
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'
|
||||
|
||||
usage() {
|
||||
echo
|
||||
echo "SYNTAX"
|
||||
echo "`basename ${0}` -h"
|
||||
echo "`basename ${0}` -i <IP> -C <warning,critical>"
|
||||
echo
|
||||
echo "EXAMPLE"
|
||||
echo "`basename ${0}` -i 192.168.0.254 -C 30,14"
|
||||
echo
|
||||
}
|
||||
|
||||
optstring=":hi:C:"
|
||||
while getopts ${optstring} arg; do
|
||||
case ${arg} in
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
:)
|
||||
echo "$0: Must supply an argument to -$OPTARG." >&2
|
||||
exit 1
|
||||
;;
|
||||
i)
|
||||
CHECK_OPTS="${CHECK_OPTS} -I ${OPTARG}"
|
||||
;;
|
||||
C)
|
||||
CHECK_OPTS="${CHECK_OPTS} -C ${OPTARG}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
res="`${CHECK} ${CHECK_OPTS}`"
|
||||
ret=${?}
|
||||
echo "${res}"
|
||||
exit ${ret}
|
Loading…
Reference in New Issue
Block a user