Merge "Skyline configure Prometheus"

This commit is contained in:
Zuul 2024-03-19 15:41:51 +00:00 committed by Gerrit Code Review
commit 0b820f10e0
7 changed files with 34 additions and 4 deletions

View File

@ -1293,6 +1293,7 @@ enable_prometheus_msteams: "no"
prometheus_alertmanager_user: "admin" prometheus_alertmanager_user: "admin"
prometheus_ceph_exporter_interval: "{{ prometheus_scrape_interval }}" prometheus_ceph_exporter_interval: "{{ prometheus_scrape_interval }}"
prometheus_grafana_user: "grafana" prometheus_grafana_user: "grafana"
prometheus_skyline_user: "skyline"
prometheus_scrape_interval: "60s" prometheus_scrape_interval: "60s"
prometheus_openstack_exporter_interval: "{{ prometheus_scrape_interval }}" prometheus_openstack_exporter_interval: "{{ prometheus_scrape_interval }}"
prometheus_openstack_exporter_timeout: "45s" prometheus_openstack_exporter_timeout: "45s"

View File

@ -154,6 +154,9 @@ prometheus_basic_auth_users_default:
- username: "{{ prometheus_grafana_user }}" - username: "{{ prometheus_grafana_user }}"
password: "{{ prometheus_grafana_password }}" password: "{{ prometheus_grafana_password }}"
enabled: "{{ enable_grafana }}" enabled: "{{ enable_grafana }}"
- username: "{{ prometheus_skyline_user }}"
password: "{{ prometheus_skyline_password }}"
enabled: "{{ enable_skyline }}"
prometheus_basic_auth_users_extra: [] prometheus_basic_auth_users_extra: []

View File

@ -46,6 +46,14 @@
- prometheus_grafana_password | length > 0 - prometheus_grafana_password | length > 0
when: enable_grafana | bool 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 - name: Checking free port for Prometheus server
wait_for: wait_for:
host: "{{ 'api' | kolla_address }}" 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 }} database_url: mysql://{{ skyline_database_user }}:{{ skyline_database_password }}@{{ skyline_database_address }}/{{ skyline_database_name }}
debug: {{ skyline_logging_debug }} debug: {{ skyline_logging_debug }}
log_dir: {{ log_dir }} 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 }} secret_key: {{ skyline_secret_key }}
session_name: {{ skyline_session_name }} session_name: {{ skyline_session_name }}
openstack: openstack:

View File

@ -38,10 +38,14 @@ Basic Auth
~~~~~~~~~~ ~~~~~~~~~~
Prometheus is protected with basic HTTP authentication. Kolla-ansible will Prometheus is protected with basic HTTP authentication. Kolla-ansible will
create the following users: ``admin`` and ``grafana`` (if grafana is create the following users: ``admin``, ``grafana`` (if grafana is
enabled). The grafana username can be overidden using the variable enabled) and ``skyline`` (if skyline is enabled). The grafana username can
``prometheus_grafana_user``. The passwords are defined by the be overidden using the variable
``prometheus_password`` and ``prometheus_grafana_password`` variables in ``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 ``passwords.yml``. The list of basic auth users can be extended using the
``prometheus_basic_auth_users_extra`` variable: ``prometheus_basic_auth_users_extra`` variable:

View File

@ -249,6 +249,7 @@ prometheus_mysql_exporter_database_password:
prometheus_alertmanager_password: prometheus_alertmanager_password:
prometheus_password: prometheus_password:
prometheus_grafana_password: prometheus_grafana_password:
prometheus_skyline_password:
prometheus_bcrypt_salt: 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.