Skip to content
Snippets Groups Projects
Commit 00ffe221 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

check_http add param -c

parent 961c63cd
No related branches found
No related tags found
1 merge request!163update 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=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment