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
259a9de9
Commit
259a9de9
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update help text; replace $cfgfile
parent
400243ce
No related branches found
No related tags found
1 merge request
!129
6468-docs-and-harmonize
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_haproxy_health
+13
-5
13 additions, 5 deletions
check_haproxy_health
with
13 additions
and
5 deletions
check_haproxy_health
+
13
−
5
View file @
259a9de9
...
@@ -21,7 +21,7 @@ export self_APPVERSION=1.6
...
@@ -21,7 +21,7 @@ export self_APPVERSION=1.6
.
$(
dirname
$0
)
/inc_haproxy_cfg.sh
.
$(
dirname
$0
)
/inc_haproxy_cfg.sh
cfgfile
=
/etc/haproxy/haproxy.cfg
tmpfile
=
/tmp/check_haproxy_healthcheck_
$$
tmpfile
=
/tmp/check_haproxy_healthcheck_
$$
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -34,7 +34,15 @@ cat <<EOF
...
@@ -34,7 +34,15 @@ cat <<EOF
$(
ph.showImlHelpHeader
)
$(
ph.showImlHelpHeader
)
Check HA Proxy health.
Check HA Proxy health.
The plugin reads
$cfgfile
to detect required status url.
The plugin reads
$HAPROXYcfgfile
to detect required status url.
It requires wget to handle the http request.
Non OK values occur:
UNKNOWN - if
$HAPROXYcfgfile
cannot be read
- haproxy is not in http mode
- the detected status url doesn't send a response
ERROR - the detected status url did not respond with Http status
code 200
SYNTAX:
SYNTAX:
$_self
[-h]
$_self
[-h]
...
@@ -65,12 +73,12 @@ esac
...
@@ -65,12 +73,12 @@ esac
ph.require wget
ph.require wget
cat
$cfgfile
>
/dev/null
cat
$
HAPROXY
cfgfile
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
ph.abort
"UNKNOWN: unable to read ha proxy config
$cfgfile
...
$(
ls
-l
$cfgfile
)
"
ph.abort
"UNKNOWN: unable to read ha proxy config
$
HAPROXY
cfgfile
...
$(
ls
-l
$
HAPROXY
cfgfile
)
"
fi
fi
cat
$cfgfile
|
grep
" mode .*http"
>
/dev/null
cat
$
HAPROXY
cfgfile
|
grep
" mode .*http"
>
/dev/null
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
ph.abort
"UNKNOWN: haproxy is not in http mode"
ph.abort
"UNKNOWN: haproxy is not in http mode"
fi
fi
...
...
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