Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
1798e040
Commit
1798e040
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Plain Diff
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
!163
update check_http
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_http
+3
-2
3 additions, 2 deletions
check_http
docs/20_Checks/check_http.md
+1
-0
1 addition, 0 deletions
docs/20_Checks/check_http.md
with
4 additions
and
2 deletions
check_http
+
3
−
2
View file @
1798e040
...
@@ -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
=
...
...
This diff is collapsed.
Click to expand it.
docs/20_Checks/check_http
d
.md
→
docs/20_Checks/check_http.md
+
1
−
0
View file @
1798e040
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment