Enable haproxy statistics unix socket
authorMichele Baldessari <michele@acksyn.org>
Sun, 16 Oct 2016 19:57:29 +0000 (21:57 +0200)
committerMichele Baldessari <michele@acksyn.org>
Sun, 16 Oct 2016 19:57:29 +0000 (21:57 +0200)
By enabling the statistics socket we allow the collection
of statistics over time for haproxy.

This socket is set to "user" level, so this socket is limited
to read-only. The "stats timeout" line is optional, but since the
default timeout of the stats socket is 10s, we set this higher.

Change-Id: I22d3ab771e981be0d2c74b60443d276973bc1639

manifests/haproxy.pp

index c4d018d..e072393 100644 (file)
@@ -632,6 +632,10 @@ class tripleo::haproxy (
       'maxconn'                  => $haproxy_global_maxconn,
       'ssl-default-bind-ciphers' => $ssl_cipher_suite,
       'ssl-default-bind-options' => $ssl_options,
+      'stats'                    => [
+        'socket /var/run/haproxy.sock mode 600 level user',
+        'timeout 2m'
+      ],
     },
     defaults_options => {
       'mode'    => 'tcp',