Check HA-Proxy health

Script: check_haproxy_health

check_haproxy_health checks health url of haproxy service. The url of it will be detected from /etc/haproxy/haproxy.cfg.

Standalone installation

From this repository ypu need next to this script:

  • inc_pluginfunctions shared function for all IML checks written in bash
  • inc_haproxy_cfg.sh shared function to parse HA proxy config

Syntax

______________________________________________________________________

CHECK_HAPROXY_HEALTH
v1.6

(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3

https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_haproxy_health.html
______________________________________________________________________

Check HA Proxy health.
The plugin reads /etc/haproxy/haproxy.cfg to detect required status url. 
It requires wget to handle the http request.

Non OK values occur:
  UNKNOWN - if /etc/haproxy/haproxy.cfg cannot be read
          - haproxy is not in http mode
          - the url wasn't detected
          - the detected status url doesn't send a response
  ERROR - the detected status url did not respond with Http status 
          code 200

SYNTAX:
check_haproxy_health [-h]

OPTIONS:

    -h or --help   show this help.

EXAMPLE:

    check_haproxy_health

Parameters

(none)

Examples

$ check_haproxy_health returns

OK: HA Proxy http://localhost:8080/_haproxy_health_check is up and running.