Merge "Adds etcd endpoints as a Prometheus scrape target"

This commit is contained in:
Zuul 2022-03-16 17:55:00 +00:00 committed by Gerrit Code Review
commit 668fecf397
4 changed files with 19 additions and 0 deletions

View File

@ -457,6 +457,7 @@ prometheus_rabbitmq_exporter_port: "{{ rabbitmq_prometheus_port }}"
prometheus_cadvisor_port: "18080"
prometheus_fluentd_integration_port: "24231"
prometheus_libvirt_exporter_port: "9177"
prometheus_etcd_integration_port: "{{ etcd_client_port }}"
# Prometheus alertmanager ports
prometheus_alertmanager_port: "9093"
@ -1109,6 +1110,7 @@ enable_prometheus_elasticsearch_exporter: "{{ enable_prometheus | bool and enabl
enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}"
enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rabbitmq | bool }}"
enable_prometheus_libvirt_exporter: "{{ enable_prometheus | bool and enable_nova | bool and nova_compute_virt_type in ['kvm', 'qemu'] }}"
enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd | bool }}"
prometheus_alertmanager_user: "admin"
prometheus_openstack_exporter_interval: "60s"

View File

@ -156,6 +156,15 @@ scrape_configs:
{% endfor %}
{% endif %}
{% if enable_prometheus_etcd_integration | bool %}
- job_name: etcd
static_configs:
- targets:
{% for host in groups["etcd"] %}
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_etcd_integration_port'] }}'
{% endfor %}
{% endif %}
{% if enable_prometheus_alertmanager | bool %}
- job_name: alertmanager
static_configs:

View File

@ -710,6 +710,7 @@
#enable_prometheus_elasticsearch_exporter: "{{ enable_prometheus | bool and enable_elasticsearch | bool }}"
#enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}"
#enable_prometheus_libvirt_exporter: "{{ enable_prometheus | bool and enable_nova | bool and nova_compute_virt_type in ['kvm', 'qemu'] }}"
#enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd | bool }}"
# List of extra parameters passed to prometheus. You can add as many to the list.
#prometheus_cmdline_extras:

View File

@ -0,0 +1,7 @@
---
features:
- |
Add ``enable_prometheus_etcd_integration`` configuration parameter which
can be used to configure Prometheus to scrape etcd metrics endpoints.
The default value of ``enable_prometheus_etcd_integration`` is set to
the combined values of ``enable_prometheus`` and ``enable_etcd``.