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

Merge branch 'add-systemdunit' into 'master'

update check_http

See merge request !163
parents 623af19e dc06fdb7
No related branches found
No related tags found
1 merge request!163update check_http
...@@ -48,6 +48,7 @@ PARAMETERS: ...@@ -48,6 +48,7 @@ PARAMETERS:
Define request: Define request:
-u URL Set url to fetch; eg. https://www.example.com/ -u URL Set url to fetch; eg. https://www.example.com/
-m METHOD Set a method, eg. HEAD; default: GET -m METHOD Set a method, eg. HEAD; default: GET
-c PARAMS additional curl params
What to check: What to check:
-s STATUSCODE exact Statuscode to check; 3 digits; by default critical -s STATUSCODE exact Statuscode to check; 3 digits; by default critical
...@@ -102,6 +103,7 @@ ph.require "curl" ...@@ -102,6 +103,7 @@ ph.require "curl"
sUrl=$( ph.getValueWithParam '' u "$@") sUrl=$( ph.getValueWithParam '' u "$@")
sMethod=$( ph.getValueWithParam 'GET' m "$@" | tr [:lower:] [:upper:]) sMethod=$( ph.getValueWithParam 'GET' m "$@" | tr [:lower:] [:upper:])
curlParams=$( ph.getValueWithParam '' c "$@")
iStatus=$( ph.getValueWithParam '' s "$@") iStatus=$( ph.getValueWithParam '' s "$@")
sHeader=$( ph.getValueWithParam '' r "$@") sHeader=$( ph.getValueWithParam '' r "$@")
...@@ -110,8 +112,7 @@ sNotInBody=$( ph.getValueWithParam '' n "$@") ...@@ -110,8 +112,7 @@ sNotInBody=$( ph.getValueWithParam '' n "$@")
sJq=$( ph.getValueWithParam '' j "$@") sJq=$( ph.getValueWithParam '' j "$@")
sLabel=$( ph.getValueWithParam "" l "$@") sLabel=$( ph.getValueWithParam "" l "$@")
curlParams+=" -si -X $sMethod"
curlParams="-si -X $sMethod"
sProblems= sProblems=
sOK= sOK=
......
...@@ -47,6 +47,7 @@ PARAMETERS: ...@@ -47,6 +47,7 @@ PARAMETERS:
Define request: Define request:
-u URL Set url to fetch; eg. https://www.example.com/ -u URL Set url to fetch; eg. https://www.example.com/
-m METHOD Set a method, eg. HEAD; default: GET -m METHOD Set a method, eg. HEAD; default: GET
-c PARAMS additional curl params
What to check: What to check:
-s STATUSCODE exact Statuscode to check; 3 digits; by default critical -s STATUSCODE exact Statuscode to check; 3 digits; by default critical
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment