////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-module-haproxy]]
== HAProxy Module

This module collects stats from http://www.haproxy.org/[HAProxy]. To configure
HAProxy to collect stats, you must enable the stats socket via TCP. For example,
to enable stats reporting via any local IP on port 14567, place this statement
under the `global` or `default` section of the haproxy config:

`stats socket 127.0.0.1:14567`

NOTE: You should use an internal private IP, or secure this with a firewall
rule, so that only designated hosts can access this data.

[float]
=== Compatibility

The HAProxy metricsets were tested with HAProxy 1.6 and are expected to work with all 1.6 versions.


[float]
=== Example Configuration

The HAProxy module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
- module: haproxy
  metricsets: ["info", "stat"]
  enabled: true
  period: 10s
  hosts: ["tcp://127.0.0.1:14567"]
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-haproxy-info,info>>

* <<metricbeat-metricset-haproxy-stat,stat>>

include::haproxy/info.asciidoc[]

include::haproxy/stat.asciidoc[]

