Support disabling Prometheus server

This is useful to people who manage their Prometheus Server
externally to Kolla Ansible, or want to use the exporters with
another framework such as Monasca.

Change-Id: Ie3f61e2e186c8e77e21a7b53d2bd7d2a27eee18e
This commit is contained in:
Doug Szumski 2020-03-20 10:56:04 +00:00
parent 9643dd54e2
commit 505cded29b
5 changed files with 11 additions and 2 deletions

View File

@ -1013,6 +1013,7 @@ use_common_mariadb_user: "no"
############
# Prometheus
############
enable_prometheus_server: "{{ enable_prometheus | bool }}"
enable_prometheus_haproxy_exporter: "{{ enable_haproxy | bool }}"
enable_prometheus_mysqld_exporter: "{{ enable_mariadb | bool }}"
enable_prometheus_node_exporter: "{{ enable_prometheus | bool }}"

View File

@ -5,13 +5,13 @@ prometheus_services:
prometheus-server:
container_name: prometheus_server
group: prometheus
enabled: true
enabled: "{{ enable_prometheus_server }}"
image: "{{ prometheus_server_image_full }}"
volumes: "{{ prometheus_server_default_volumes + prometheus_server_extra_volumes }}"
dimensions: "{{ prometheus_server_dimensions }}"
haproxy:
prometheus_server:
enabled: "{{ enable_prometheus }}"
enabled: "{{ enable_prometheus_server }}"
mode: "http"
external: false
port: "{{ prometheus_port }}"

View File

@ -25,6 +25,7 @@
when:
- container_facts['prometheus_server'] is not defined
- inventory_hostname in groups['prometheus']
- enable_prometheus_server | bool
- name: Checking free port for Prometheus node_exporter
wait_for:

View File

@ -632,6 +632,7 @@
############
# Prometheus
############
#enable_prometheus_server: "{{ enable_prometheus | bool }}"
#enable_prometheus_haproxy_exporter: "{{ enable_haproxy | bool }}"
#enable_prometheus_mysqld_exporter: "{{ enable_mariadb | bool }}"
#enable_prometheus_node_exporter: "{{ enable_prometheus | bool }}"

View File

@ -0,0 +1,6 @@
---
features:
- |
Prometheus server can now be disabled, allowing the exporters to be
deployed without it. The default behaviour of deploying Prometheus
server when Prometheus is enabled remains.