aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy.inc
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2014-02-16 21:04:47 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2014-02-16 21:07:44 +0100
commitb07bce1a7b918ade438851b60a25372abdef7908 (patch)
tree95c030d7bdf5c171aab58f9a92e92a5394262ed1 /config/haproxy-devel/haproxy.inc
parent085d9fbf916b389037799bd74fa10e1da3c60f27 (diff)
downloadpfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.tar.gz
pfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.tar.bz2
pfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.zip
haproxy-devel, integrated stats page with stick-table info WebGUI
Diffstat (limited to 'config/haproxy-devel/haproxy.inc')
-rw-r--r--config/haproxy-devel/haproxy.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc
index 5e798dc2..bcadcfd9 100644
--- a/config/haproxy-devel/haproxy.inc
+++ b/config/haproxy-devel/haproxy.inc
@@ -627,6 +627,21 @@ function haproxy_writeconf($configpath) {
}
}
fwrite ($fd, "\n");
+
+ $localstatsport = $a_global['localstatsport'];
+ if ($localstatsport){
+ fwrite ($fd, "listen HAProxyLocalStats\n");
+ fwrite ($fd, "\tbind 127.0.0.1:$localstatsport\n");
+ fwrite ($fd, "\tmode http\n");
+ fwrite ($fd, "\tstats enable\n");
+ fwrite ($fd, "\tstats refresh 10\n");
+ fwrite ($fd, "\tstats admin if TRUE\n");
+ fwrite ($fd, "\tstats uri /haproxy_stats.php?haproxystats=1\n");
+ fwrite ($fd, "\ttimeout client 5000\n");
+ fwrite ($fd, "\ttimeout connect 5000\n");
+ fwrite ($fd, "\ttimeout server 5000\n");
+ fwrite ($fd, "\n");
+ }
}
// Try and get a unique array for address:port as frontends can duplicate