Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iris/yoga #463

Draft
wants to merge 2 commits into
base: stackhpc/yoga
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd
enable_prometheus_msteams: "no"

prometheus_alertmanager_user: "admin"
prometheus_user: "admin"
prometheus_openstack_exporter_interval: "60s"
prometheus_openstack_exporter_timeout: "45s"
prometheus_elasticsearch_exporter_interval: "60s"
Expand All @@ -1290,6 +1291,9 @@ prometheus_openstack_exporter_compute_api_version: "2.1"
prometheus_libvirt_exporter_interval: "60s"
prometheus_msteams_webhook_url:

prometheus_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn | put_address_in_context('url') }}:{{ prometheus_port }}"
prometheus_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_port }}"

############
# Vitrage
############
Expand Down
13 changes: 13 additions & 0 deletions ansible/roles/prometheus/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ prometheus_services:
external: false
port: "{{ prometheus_port }}"
active_passive: "{{ prometheus_active_passive | bool }}"
prometheus_server_external:
enabled: "{{ enable_prometheus_server_external | bool }}"
mode: "http"
external: true
port: "{{ prometheus_port }}"
auth_user: "{{ prometheus_user }}"
auth_pass: "{{ prometheus_password }}"
active_passive: "{{ prometheus_active_passive | bool }}"
prometheus-node-exporter:
container_name: prometheus_node_exporter
group: prometheus-node-exporter
Expand Down Expand Up @@ -121,6 +129,11 @@ prometheus_services:
volumes: "{{ prometheus_msteams_default_volumes + prometheus_msteams_extra_volumes }}"
dimensions: "{{ prometheus_msteams_dimensions }}"

####################
# Server
####################
enable_prometheus_server_external: false

####################
# Database
####################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"command": "/opt/prometheus/prometheus --config.file /etc/prometheus/prometheus.yml --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_port }} --web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ prometheus_port }} --storage.tsdb.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
"command": "/opt/prometheus/prometheus --config.file /etc/prometheus/prometheus.yml --web.listen-address {{ api_interface_address | put_address_in_context('url') }}:{{ prometheus_port }} --web.external-url={{ prometheus_public_endpoint if enable_prometheus_server_external else prometheus_internal_endpoint }} --storage.tsdb.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
"config_files": [
{
"source": "{{ container_config_directory }}/prometheus.yml",
Expand Down
1 change: 1 addition & 0 deletions etc/kolla/passwords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ redis_master_password:
####################
prometheus_mysql_exporter_database_password:
prometheus_alertmanager_password:
prometheus_password:

###############################
# OpenStack identity federation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
features:
- |
Adds support for exposing Prometheus server on the external interface. This
is disabled by default and can be enabled by setting
``enable_prometheus_server_external`` to ``true``. Basic auth is used to
protect the endpoint. The password is under the key ``prometheus_password``
in the Kolla passwords file. The username can be configured with
``prometheus_user`` and defaults to ``admin``.