aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/group_vars/all.yml1
-rw-r--r--ansible/roles/prometheus/defaults/main.yml3
-rw-r--r--ansible/roles/prometheus/tasks/precheck.yml8
-rw-r--r--ansible/roles/skyline/templates/skyline.yaml.j26
-rw-r--r--doc/source/reference/logging-and-monitoring/prometheus-guide.rst12
-rw-r--r--etc/kolla/passwords.yml1
-rw-r--r--releasenotes/notes/skyline-configure-prometheus-f86aea1beebcc379.yaml7
7 files changed, 34 insertions, 4 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 695f7a85a..9cfaee766 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -1294,6 +1294,7 @@ enable_prometheus_msteams: "no"
prometheus_alertmanager_user: "admin"
prometheus_ceph_exporter_interval: "{{ prometheus_scrape_interval }}"
prometheus_grafana_user: "grafana"
+prometheus_skyline_user: "skyline"
prometheus_scrape_interval: "60s"
prometheus_openstack_exporter_interval: "{{ prometheus_scrape_interval }}"
prometheus_openstack_exporter_timeout: "45s"
diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml
index 1134b294f..cdd3cf485 100644
--- a/ansible/roles/prometheus/defaults/main.yml
+++ b/ansible/roles/prometheus/defaults/main.yml
@@ -154,6 +154,9 @@ prometheus_basic_auth_users_default:
- username: "{{ prometheus_grafana_user }}"
password: "{{ prometheus_grafana_password }}"
enabled: "{{ enable_grafana }}"
+ - username: "{{ prometheus_skyline_user }}"
+ password: "{{ prometheus_skyline_password }}"
+ enabled: "{{ enable_skyline }}"
prometheus_basic_auth_users_extra: []
diff --git a/ansible/roles/prometheus/tasks/precheck.yml b/ansible/roles/prometheus/tasks/precheck.yml
index 29b71e316..a9487ae97 100644
--- a/ansible/roles/prometheus/tasks/precheck.yml
+++ b/ansible/roles/prometheus/tasks/precheck.yml
@@ -46,6 +46,14 @@
- prometheus_grafana_password | length > 0
when: enable_grafana | bool
+- name: Check that prometheus_skyline_password is correctly set
+ assert:
+ that:
+ - prometheus_skyline_password is defined
+ - prometheus_skyline_password is string
+ - prometheus_skyline_password | length > 0
+ when: enable_skyline | bool
+
- name: Checking free port for Prometheus server
wait_for:
host: "{{ 'api' | kolla_address }}"
diff --git a/ansible/roles/skyline/templates/skyline.yaml.j2 b/ansible/roles/skyline/templates/skyline.yaml.j2
index f99810954..b6bb53b57 100644
--- a/ansible/roles/skyline/templates/skyline.yaml.j2
+++ b/ansible/roles/skyline/templates/skyline.yaml.j2
@@ -5,6 +5,12 @@ default:
database_url: mysql://{{ skyline_database_user }}:{{ skyline_database_password }}@{{ skyline_database_address }}/{{ skyline_database_name }}
debug: {{ skyline_logging_debug }}
log_dir: {{ log_dir }}
+{% if enable_prometheus | bool %}
+ prometheus_basic_auth_password: "{{ prometheus_skyline_password }}"
+ prometheus_basic_auth_user: "{{ prometheus_skyline_user }}"
+ prometheus_enable_basic_auth: true
+ prometheus_endpoint: "{{ prometheus_internal_endpoint }}"
+{% endif %}
secret_key: {{ skyline_secret_key }}
session_name: {{ skyline_session_name }}
openstack:
diff --git a/doc/source/reference/logging-and-monitoring/prometheus-guide.rst b/doc/source/reference/logging-and-monitoring/prometheus-guide.rst
index cc2f63298..a36e906f2 100644
--- a/doc/source/reference/logging-and-monitoring/prometheus-guide.rst
+++ b/doc/source/reference/logging-and-monitoring/prometheus-guide.rst
@@ -38,10 +38,14 @@ Basic Auth
~~~~~~~~~~
Prometheus is protected with basic HTTP authentication. Kolla-ansible will
-create the following users: ``admin`` and ``grafana`` (if grafana is
-enabled). The grafana username can be overidden using the variable
-``prometheus_grafana_user``. The passwords are defined by the
-``prometheus_password`` and ``prometheus_grafana_password`` variables in
+create the following users: ``admin``, ``grafana`` (if grafana is
+enabled) and ``skyline`` (if skyline is enabled). The grafana username can
+be overidden using the variable
+``prometheus_grafana_user``, the skyline username can
+be overidden using the variable ``prometheus_skyline_user``.
+The passwords are defined by the
+``prometheus_password``, ``prometheus_grafana_password`` and
+``prometheus_skyline_password`` variables in
``passwords.yml``. The list of basic auth users can be extended using the
``prometheus_basic_auth_users_extra`` variable:
diff --git a/etc/kolla/passwords.yml b/etc/kolla/passwords.yml
index f59ab1cea..41c7934f8 100644
--- a/etc/kolla/passwords.yml
+++ b/etc/kolla/passwords.yml
@@ -249,6 +249,7 @@ prometheus_mysql_exporter_database_password:
prometheus_alertmanager_password:
prometheus_password:
prometheus_grafana_password:
+prometheus_skyline_password:
prometheus_bcrypt_salt:
###############################
diff --git a/releasenotes/notes/skyline-configure-prometheus-f86aea1beebcc379.yaml b/releasenotes/notes/skyline-configure-prometheus-f86aea1beebcc379.yaml
new file mode 100644
index 000000000..de46d880e
--- /dev/null
+++ b/releasenotes/notes/skyline-configure-prometheus-f86aea1beebcc379.yaml
@@ -0,0 +1,7 @@
+---
+features:
+ - |
+ Configure Skyline's Prometheus connection to make the Monitor Center work.
+ The latest Skyline Console has now a Monitor Center in the administrator
+ view that displays information from Prometheus. For that to work the
+ Prometheus connection needs to be set up in skyline.yaml.