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

update help text; replace $cfgfile

parent 400243ce
No related branches found
No related tags found
1 merge request!1296468-docs-and-harmonize
...@@ -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 $HAPROXYcfgfile >/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 $HAPROXYcfgfile ... $(ls -l $HAPROXYcfgfile)"
fi fi
cat $cfgfile | grep " mode .*http" >/dev/null cat $HAPROXYcfgfile | 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment