HAProxy plugin

This plugin collects statistics from an HAProxy instance.To get statistics from HAProxy instance, you must instruct HAProxy where to host the statistics. Either a filesocket or webpage can be specified.


Meter 4.2 or later must be installed.

The HAProxy plugin supports the following Operating Systems.

Smart OS(tick)
OS X(tick)

Plugin setup

The plugin requires a web page to collect HAProxy statistics.

To use a File Socket for hosting HAProxy statistics

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

global stats socket /tmp/haproxy mode 777 level operator

  • 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.

To use a Web Page for hosting HAProxy statistics

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

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

  • stats enable tells haproxy to enable the webpage.

  • stats uri /stats tells haproxy to host the webpage at /stats. Use a unique URL that is not being used in your application. If your website already has a /stats page, use another value.

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

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

After you make the update, type sudo service haproxy reload to reload your haproxy configuration.

To install the plugin

  1. From the top right of the screen, perform one of the following actions:
    • Click Settings > Data Collection, select the TrueSight meter, and select the Sources tab.

    • Click Settings > Configure Sources.
  2. Use the search box or scroll through the page to find the source system which has the TrueSight meter on which you want to install the plugin.
  3. Click the name of the source to view source details.
  4. Select the Plugins tab.
  5. Use the search box or scroll through the page to find the plugin you want to install.
  6. Click + Install to start the installation.

    Refer to the following sections for the configuration details required to collect data and view the list of plugin metrics.

Configuration details

Field NameJSLUADescription
SourceXXThe Source to display in the legend for the haproxy data. It will default to the hostname of the server
Socket pathX The 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

Advanced configuration

To customize this plugin, see HA Proxy plugin on GitHub.

Plugin metrics

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)
Was this page helpful? Yes No Submitting... Thank you