Skip to content
Snippets Groups Projects

6468-docs-and-harmonize

1 file
+ 13
5
Compare changes
  • Side-by-side
  • Inline
+ 13
5
@@ -21,7 +21,7 @@ export self_APPVERSION=1.6
. $(dirname $0)/inc_haproxy_cfg.sh
cfgfile=/etc/haproxy/haproxy.cfg
tmpfile=/tmp/check_haproxy_healthcheck_$$
# ----------------------------------------------------------------------
@@ -34,7 +34,15 @@ cat <<EOF
$( ph.showImlHelpHeader )
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:
$_self [-h]
@@ -65,12 +73,12 @@ esac
ph.require wget
cat $cfgfile >/dev/null
cat $HAPROXYcfgfile >/dev/null
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
cat $cfgfile | grep " mode .*http" >/dev/null
cat $HAPROXYcfgfile | grep " mode .*http" >/dev/null
if [ $? -ne 0 ]; then
ph.abort "UNKNOWN: haproxy is not in http mode"
fi
Loading