diff --git a/check_http b/check_http index e035bf64f998276f7f2dd8af6b4e90386cdc8b41..81a1c794a13bdd97f9efba9239dcf74d94d7c1ad 100755 --- a/check_http +++ b/check_http @@ -48,6 +48,7 @@ PARAMETERS: Define request: -u URL Set url to fetch; eg. https://www.example.com/ -m METHOD Set a method, eg. HEAD; default: GET + -c PARAMS additional curl params What to check: -s STATUSCODE exact Statuscode to check; 3 digits; by default critical @@ -102,6 +103,7 @@ ph.require "curl" sUrl=$( ph.getValueWithParam '' u "$@") sMethod=$( ph.getValueWithParam 'GET' m "$@" | tr [:lower:] [:upper:]) +curlParams=$( ph.getValueWithParam '' c "$@") iStatus=$( ph.getValueWithParam '' s "$@") sHeader=$( ph.getValueWithParam '' r "$@") @@ -111,7 +113,10 @@ sJq=$( ph.getValueWithParam '' j "$@") sLabel=$( ph.getValueWithParam "" l "$@") -curlParams="-si -X $sMethod" +curlParams+=" -si -X $sMethod" + +# echo "Url is $sUrl" + sProblems= sOK=