From 7219279215af03c9eaa7d361764743897a69a275 Mon Sep 17 00:00:00 2001 From: Franco Mariotti Date: Thu, 28 Jul 2022 12:33:41 -0300 Subject: [PATCH] Allow exposing OpenStack exporter via HAProxy Signed-off-by: Franco Mariotti Change-Id: Ie151cd97d3e0ba3bfec9e95a5b8bdfef0b54806c --- ansible/group_vars/all.yml | 1 + ansible/roles/prometheus/defaults/main.yml | 5 +++++ ...us-openstack-exporter-option-03920e7308c0b6e5.yaml | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/adds-new-prometheus-openstack-exporter-option-03920e7308c0b6e5.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index f8ded86070..f28fe9278c 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -1133,6 +1133,7 @@ enable_prometheus_alertmanager: "{{ enable_prometheus | bool }}" enable_prometheus_alertmanager_external: "{{ enable_prometheus_alertmanager | bool }}" enable_prometheus_ceph_mgr_exporter: "no" enable_prometheus_openstack_exporter: "{{ enable_prometheus | bool }}" +enable_prometheus_openstack_exporter_external: "no" enable_prometheus_elasticsearch_exporter: "{{ enable_prometheus | bool and enable_elasticsearch | bool }}" enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}" enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rabbitmq | bool }}" diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index 65a252101e..058bf7796d 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -87,6 +87,11 @@ prometheus_services: mode: "http" external: false port: "{{ prometheus_openstack_exporter_port }}" + prometheus_openstack_exporter_external: + enabled: "{{ enable_prometheus_openstack_exporter_external | bool }}" + mode: "http" + external: true + port: "{{ prometheus_openstack_exporter_port }}" prometheus-elasticsearch-exporter: container_name: prometheus_elasticsearch_exporter group: prometheus-elasticsearch-exporter diff --git a/releasenotes/notes/adds-new-prometheus-openstack-exporter-option-03920e7308c0b6e5.yaml b/releasenotes/notes/adds-new-prometheus-openstack-exporter-option-03920e7308c0b6e5.yaml new file mode 100644 index 0000000000..050ef744b4 --- /dev/null +++ b/releasenotes/notes/adds-new-prometheus-openstack-exporter-option-03920e7308c0b6e5.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Adds a new, disabled by default, option for Prometheus + OpenStack exporter, named + "enable_prometheus_openstack_exporter_external". + This option allows exposing OpenStack exporter through + HAProxy, and may be used to expose OpenStack metrics + to an existing Prometheus server outside the OpenStack + cloud, instead of using the default one provided by + OpenStack.