check_curl help message
This commit is contained in:
parent
92e9006a45
commit
9fa8c95210
20
check_curl
20
check_curl
|
@ -3,6 +3,16 @@
|
|||
# Define the usage message
|
||||
usage() {
|
||||
echo "Usage: $0 -u <url> [-w <warning>] [-c <critical>] [-C <contains>] [-L] [-I] [-H <headers>] [-p] [-R]"
|
||||
echo "[Arguments]:
|
||||
-u Specify the URL to check (required).
|
||||
-w Set the warn level for response time (default: 1 second).
|
||||
-c Set the critical level for response time (default: 2 seconds).
|
||||
-C If the body does not contain this string, return CRITICAL.
|
||||
-L Follow redirects.
|
||||
-I Insecure mode (--insecure).
|
||||
-H Specify headers. Formatted like \"Header1: value,Header2: value\"
|
||||
-p Print the curl command and exit
|
||||
-R Set curl --resolve option."
|
||||
exit 3
|
||||
}
|
||||
|
||||
|
@ -60,12 +70,10 @@ for value in "${values[@]}"; do
|
|||
HEADER_ARGS+=' -H "'$value'" '
|
||||
done
|
||||
|
||||
CURL_CMD=""
|
||||
|
||||
if $PRINT_ONLY; then
|
||||
echo "curl $CURL_CMD"
|
||||
exit 3
|
||||
fi
|
||||
#if $PRINT_ONLY; then
|
||||
# echo "curl $CURL_CMD"
|
||||
# exit 3
|
||||
#fi
|
||||
|
||||
TMP_ERROR_LOG=$(mktemp)
|
||||
TMP_RESPONSE=$(mktemp)
|
||||
|
|
Loading…
Reference in New Issue