Skip to content
Snippets Groups Projects
Commit 0fcb06b4 authored by Quentin MACHU's avatar Quentin MACHU
Browse files

Added HAProxy stats

parent b63d73de
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,13 @@ iaas::role::endpoint::main_hostname: 'endpoint-1'
iaas::role::endpoint::main_address: endpoint-1 # The main address used to access the cluster / the load-balancers ;; should point to the dns round-robin for endpoints
iaas::role::endpoint::haproxy_port: [8140]
iaas::profile::haproxy::stats_enabled: true
iaas::profile::haproxy::stats_ports: [1936]
iaas::profile::haproxy::stats_refresh: "30s"
iaas::profile::haproxy::stats_login: "stats"
iaas::profile::haproxy::stats_password: "stats"
iaas::profile::haproxy::stats_uri: "/"
# Galera MySQL
iaas::profile::database::servers: [controller-1, controller-2, controller-3]
iaas::profile:database::galera_master: controller-1
......
class iaas::profile::haproxy {
class iaas::profile::haproxy (
$stats_enabled = undef,
$stats_ports = undef,
$stats_refresh = undef,
$stats_login = undef,
$stats_password = undef,
$stats_uri = undef,
) {
class { '::haproxy':
defaults_options => {
'retries' => '3',
......@@ -14,6 +21,24 @@ class iaas::profile::haproxy {
},
}
if stats_enabled {
haproxy::listen { 'stats':
ipaddress => '0.0.0.0',
mode => 'http',
ports => $stats_ports,
options => {
'stats' => [
'enable',
'hide-version',
"refresh ${stats_refresh}",
'show-node',
"auth ${stats_login}:${stats_password}",
"uri ${stats_uri}"
],
}
}
}
haproxy::listen { 'galera':
ipaddress => '0.0.0.0',
mode => 'tcp',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment