diff --git a/check_http b/check_http index e035bf64f998276f7f2dd8af6b4e90386cdc8b41..ea797ea154d00b685976bfea02a93039ff0a03ad 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 "$@") @@ -110,8 +112,7 @@ sNotInBody=$( ph.getValueWithParam '' n "$@") sJq=$( ph.getValueWithParam '' j "$@") sLabel=$( ph.getValueWithParam "" l "$@") - -curlParams="-si -X $sMethod" +curlParams+=" -si -X $sMethod" sProblems= sOK= diff --git a/docs/20_Checks/check_httpd.md b/docs/20_Checks/check_http.md similarity index 98% rename from docs/20_Checks/check_httpd.md rename to docs/20_Checks/check_http.md index 30a03fc10af2d4877de3fbc5773cc7024e22990d..d229b217f4d74df4ac2114fd6fdaf9be6f9ebfb3 100644 --- a/docs/20_Checks/check_httpd.md +++ b/docs/20_Checks/check_http.md @@ -47,6 +47,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