Browse Source

Add haproxy prometheus/alertmanager endpoint for Ceph Dashboard

This change adds the prometheus and alertmanager endpoints which
are on the same grafana network and allow us to just use a single
vip to access the prometheus and alertmanager instances from the
ceph dashboard when enabled.
We already did it for grafana [1] and we would like to do the same
for prometheus and alertmanager.

[1] https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-dashboard/tasks/configure_dashboard.yml#L192

Change-Id: I0dbcde302a3abdfccc3dd996b1c238e25064dd12
(cherry picked from commit 92c76046a8)
changes/93/787393/2
Francesco Pantano 1 month ago
parent
commit
0bc10e5b7c
1 changed files with 32 additions and 0 deletions
  1. +32
    -0
      manifests/haproxy.pp

+ 32
- 0
manifests/haproxy.pp View File

@ -720,6 +720,10 @@ class tripleo::haproxy (
zaqar_ws_ssl_port => 3000,
ceph_grafana_port => 3100,
ceph_grafana_ssl_port => 3100,
ceph_prometheus_port => 9092,
ceph_prometheus_ssl_port => 9092,
ceph_alertmanager_port => 9093,
ceph_alertmanager_ssl_port => 9093,
ceph_dashboard_port => 8444,
ceph_dashboard_ssl_port => 8444,
}
@ -964,6 +968,34 @@ class tripleo::haproxy (
service_network => $ceph_grafana_network,
member_options => union($haproxy_member_options, $internal_tls_member_options),
}
::tripleo::haproxy::endpoint { 'ceph_prometheus':
internal_ip => hiera('ceph_grafana_vip', $controller_virtual_ip),
service_port => $ports[ceph_prometheus_port],
ip_addresses => hiera('ceph_grafana_node_ips', $controller_hosts_real),
server_names => hiera('ceph_grafana_node_names', $controller_hosts_names_real),
mode => 'http',
public_ssl_port => $ports[ceph_prometheus_ssl_port],
listen_options => merge($default_listen_options, {
'option' => [ 'httpchk GET /metrics' ],
'balance' => 'source',
}),
service_network => $ceph_grafana_network,
member_options => $haproxy_member_options,
}
::tripleo::haproxy::endpoint { 'ceph_alertmanager':
internal_ip => hiera('ceph_grafana_vip', $controller_virtual_ip),
service_port => $ports[ceph_alertmanager_port],
ip_addresses => hiera('ceph_grafana_node_ips', $controller_hosts_real),
server_names => hiera('ceph_grafana_node_names', $controller_hosts_names_real),
mode => 'http',
public_ssl_port => $ports[ceph_alertmanager_ssl_port],
listen_options => merge($default_listen_options, {
'option' => [ 'httpchk GET /' ],
'balance' => 'source',
}),
service_network => $ceph_grafana_network,
member_options => $haproxy_member_options,
}
}
if $ceph_dashboard {


Loading…
Cancel
Save