Skip to content

Commit 9fbb0d1

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "prometheus: Collect metrics from rabbitmq" into stable/victoria
2 parents 5ef5870 + 9ad4b7a commit 9fbb0d1

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

ansible/group_vars/all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ prometheus_node_exporter_port: "9100"
433433
prometheus_mysqld_exporter_port: "9104"
434434
prometheus_haproxy_exporter_port: "9101"
435435
prometheus_memcached_exporter_port: "9150"
436+
prometheus_rabbitmq_exporter_port: "15692"
436437
# Default cadvisor port of 8080 already in use
437438
prometheus_cadvisor_port: "18080"
438439

@@ -1092,6 +1093,7 @@ enable_prometheus_ceph_mgr_exporter: "no"
10921093
enable_prometheus_openstack_exporter: "{{ enable_prometheus | bool }}"
10931094
enable_prometheus_elasticsearch_exporter: "{{ enable_prometheus | bool and enable_elasticsearch | bool }}"
10941095
enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}"
1096+
enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rabbitmq | bool }}"
10951097

10961098
prometheus_alertmanager_user: "admin"
10971099
prometheus_openstack_exporter_interval: "60s"

ansible/roles/prometheus/templates/prometheus.yml.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ scrape_configs:
4747
{% endfor %}
4848
{% endif %}
4949

50+
{% if enable_prometheus_rabbitmq_exporter | bool %}
51+
- job_name: rabbitmq
52+
static_configs:
53+
- targets:
54+
{% for host in groups['rabbitmq'] %}
55+
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_rabbitmq_exporter_port'] }}'
56+
{% endfor %}
57+
{% endif %}
58+
5059
{% if enable_prometheus_memcached_exporter | bool %}
5160
- job_name: memcached
5261
static_configs:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
Adds support for collecting Prometheus metrics from RabbitMQ. This is
5+
enabled by default when Prometheus and RabbitMQ are enabled, and may be
6+
disabled by setting ``enable_prometheus_rabbitmq_exporter`` to ``false``.

0 commit comments

Comments
 (0)