Skyline configure Prometheus

Change-Id: I0a086c59076120aa53e6a05526dbab88e393c1c7
This commit is contained in:
Uwe Jäger 2024-02-28 13:55:26 +01:00
parent 5169e3bcbe
commit 13dd9309df
7 changed files with 34 additions and 4 deletions

View File

@ -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"

View File

@ -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: []

View File

@ -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 }}"

View File

@ -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:

View File

@ -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:

View File

@ -249,6 +249,7 @@ prometheus_mysql_exporter_database_password:
prometheus_alertmanager_password:
prometheus_password:
prometheus_grafana_password:
prometheus_skyline_password:
prometheus_bcrypt_salt:
###############################

View File

@ -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.