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
38b48115
Commit
38b48115
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
fix wrong exitcode to "critical"
parent
92b6f80b
Branches
Branches containing commit
No related tags found
1 merge request
!138
6468 docs and harmonize
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
check_haproxy_health
+4
-3
4 additions, 3 deletions
check_haproxy_health
check_ssl
+4
-3
4 additions, 3 deletions
check_ssl
with
8 additions
and
6 deletions
check_haproxy_health
+
4
−
3
View file @
38b48115
...
@@ -12,12 +12,13 @@
...
@@ -12,12 +12,13 @@
# 2021-12-14 v1.3 <axel.hahn@iml.unibe.ch> use updated haproxy paser in sourced file
# 2021-12-14 v1.3 <axel.hahn@iml.unibe.ch> use updated haproxy paser in sourced file
# 2022-04-01 v1.4 <axel.hahn@iml.unibe.ch> use wget default params; shell fixes
# 2022-04-01 v1.4 <axel.hahn@iml.unibe.ch> use wget default params; shell fixes
# 2022-10-21 v1.5 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# 2022-10-21 v1.5 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# 2023-07-28 v1.6 <axel.hahn@unibe.ch> add help page
# 2023-07-28 v1.6 <axel.hahn@unibe.ch> add help page
# 2023-08-23 v1.7 <axel.hahn@unibe.ch> fix wrong exitcode to "critical"
# ======================================================================
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
.
$(
dirname
$0
)
/inc_pluginfunctions
export
self_APPVERSION
=
1.
6
export
self_APPVERSION
=
1.
7
.
$(
dirname
$0
)
/inc_haproxy_cfg.sh
.
$(
dirname
$0
)
/inc_haproxy_cfg.sh
...
@@ -106,7 +107,7 @@ fi
...
@@ -106,7 +107,7 @@ fi
grep
"200 OK"
$tmpfile
>
/dev/null
grep
"200 OK"
$tmpfile
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
ph.setStatus
"
error
"
ph.setStatus
"
critical
"
ph.status
"url
$safeurl
did not contain 200 OK.
$(
wget
-T
5
-t
1
--no-check-certificate
-O
-
-S
$url
)
"
ph.status
"url
$safeurl
did not contain 200 OK.
$(
wget
-T
5
-t
1
--no-check-certificate
-O
-
-S
$url
)
"
else
else
ph.status
"HA Proxy
$safeurl
is up and running."
ph.status
"HA Proxy
$safeurl
is up and running."
...
...
This diff is collapsed.
Click to expand it.
check_ssl
+
4
−
3
View file @
38b48115
...
@@ -15,8 +15,9 @@
...
@@ -15,8 +15,9 @@
# ds=daniel.schueler@iml.unibe.ch
# ds=daniel.schueler@iml.unibe.ch
#
#
# 2017-03-03 v1.0 ah,ds
# 2017-03-03 v1.0 ah,ds
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes
# 2023-02-13 v1.2 <axel.hahn@unibe.ch> some shell fixes
# 2023-08-23 v1.3 <axel.hahn@unibe.ch> fix wrong exitcode to "critical"
# ======================================================================
# ======================================================================
...
@@ -75,7 +76,7 @@ function showHelp(){
...
@@ -75,7 +76,7 @@ function showHelp(){
echo
| openssl s_client
-connect
${
sDomain
}
:
${
iPort
}
>
/dev/null 2>&1
echo
| openssl s_client
-connect
${
sDomain
}
:
${
iPort
}
>
/dev/null 2>&1
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
ph.setStatus
"
error
"
ph.setStatus
"
critical
"
ph.status
"unable to connect to
${
sDomain
}
via port :
${
iPort
}
- maybe wrong host ... or port ... wrong chaining"
ph.status
"unable to connect to
${
sDomain
}
via port :
${
iPort
}
- maybe wrong host ... or port ... wrong chaining"
# repeat the last command without redirecting output
# repeat the last command without redirecting output
echo
| openssl s_client
-connect
${
sDomain
}
:
${
iPort
}
echo
| openssl s_client
-connect
${
sDomain
}
:
${
iPort
}
...
...
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