Skip to content

graphdat/plugin-haproxy

Repository files navigation

Boundary HAProxy Plugin

Collects statistics from an HAProxy instance. To get statistics from HAProxy instance, you need to instruct HAProxy where to host the statistics. Either a filesocket or webpage can be specified.

Prerequisites

OSLinuxWindowsSmartOSOS X
Supportedvvvv

Boundary Meter Versions V4.0 Or Later

Runtimenode.jsPythonJava
Required

For Boundary Meter less than V4.0

Runtimenode.jsPythonJava
Required+

Plugin Setup

For Boundary Meter V4.0

The plugin requires a web page to collect HAProxy statistics. The sections below describe configuration for each.

For Boundary Meter less than V4.0

The plugin requires either a file socket or a web page to collect HAProxy statistics. The sections below describe configuration for each.

Using a File Socket

For Boundary Meter less than V4.0

The following snippet of configuration will host the statistics on a file socket.

  • the mode parameter sets the mode of the file socket. If the relay is running as the same user as haproxy, mode 777 can be omitted'

  • the level parameter limits the commands available from the file socket

    global stats socket /tmp/haproxy mode 777 level operator

Using a Web Page

For all supported Boundary Meter versions

The following snippet of configuration will tell haproxy to host a webpage the plugin will scrape (you can view the webpage as well)

  • stats enable tell haproxy to enable the webpage

  • stats uri /stats tell haproxy to host the webpage at /stats, this needs to be a unique URL not being used in your application. If your website already has a /stats page, change this values to something else

  • stats auth username:password tell haproxy to password protect the page with the username and password combination

  • stats refresh 10 tells haproxy to refresh the webpage every 10s if your browser is viewing it

    defaults stats enable stats uri /stats stats auth username:password stats refresh 10

Once you make the update, reload your haproxy configuration sudo service haproxy reload

Plugin Configuration Fields

Field NameJSLUADescription
SourceXXThe Source to display in the legend for the haproxy data. It will default to the hostname of the server
Socket pathXThe Haproxy statistics Socket path. Socket or URL is required
Statistics URLXXThe URL endpoint of where the haproxy statistics are hosted. Socket or URL is required
UsernameXXIf the endpoint is password protected, what username should graphdat use when calling it.
PasswordXXIf the endpoint is password protected, what password should graphdat use when calling it.
FilterXXWhich Server groups would you like to view
Poll SecondsXXHow often should the plugin poll the Haproxy endpoint

Metrics Collected

Tracks the following metrics for haproxy

Metric NameDescription
Haproxy Queued Requestscurrent queued requests
Haproxy Queue Limitqueue Limit
Haproxy Handled Requeststotal number of HTTP requests handled
Haproxy Client Abortsnumber of data transfers aborted by the client
Haproxy Server abortsnumber of data transfers aborted by the server
Haproxy Current Sessionscurrent sessions
Haproxy Session Limitsession limit
Haproxy Bytes Inbytes in
Haproxy Bytes Outbytes out
Haproxy Warningsretries + redispatched
Haproxy Errorsrequest errors + connection errors + response errors
Haproxy Failed Health Checksthe number of failed health checks
Haproxy Downtimethe number of seconds haproxy is down
Haproxy 1XX RespThe number of 1XX HTTP responses
Haproxy 2XX Respthe number of 2XX HTTP responses
Haproxy 3XX Respthe number of 3XX HTTP responses
Haproxy 4XX Respthe number of 4XX HTTP responses
Haproxy 5XX Respthe number of 5XX HTTP responses
Haproxy Other Resphttp responses with other codes (protocol error)

About

The Graphdat Haproxy plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6