prometheus: Collect metrics from rabbitmq

The rabbitmq_prometheus plugin is available in RabbitMQ 3.8.

https://www.rabbitmq.com/prometheus.html

Implements: blueprint rabbitmq-prometheus
Co-Authored-By: Mark Goddard <mark@stackhpc.com>
Change-Id: I4d69a93a6c70db8d40626042cdbe773747b238ae
This commit is contained in:
zhubingbing 2019-01-04 13:32:40 +08:00 committed by Mark Goddard
parent 067a752206
commit f486e4930f
3 changed files with 17 additions and 0 deletions

View File

@ -430,6 +430,7 @@ prometheus_node_exporter_port: "9100"
prometheus_mysqld_exporter_port: "9104"
prometheus_haproxy_exporter_port: "9101"
prometheus_memcached_exporter_port: "9150"
prometheus_rabbitmq_exporter_port: "15692"
# Default cadvisor port of 8080 already in use
prometheus_cadvisor_port: "18080"
@ -1077,6 +1078,7 @@ enable_prometheus_ceph_mgr_exporter: "no"
enable_prometheus_openstack_exporter: "{{ enable_prometheus | bool }}"
enable_prometheus_elasticsearch_exporter: "{{ enable_prometheus | bool and enable_elasticsearch | bool }}"
enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}"
enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rabbitmq | bool }}"
prometheus_alertmanager_user: "admin"
prometheus_openstack_exporter_interval: "60s"

View File

@ -47,6 +47,15 @@ scrape_configs:
{% endfor %}
{% endif %}
{% if enable_prometheus_rabbitmq_exporter | bool %}
- job_name: rabbitmq
static_configs:
- targets:
{% for host in groups['rabbitmq'] %}
- '{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['prometheus_rabbitmq_exporter_port'] }}'
{% endfor %}
{% endif %}
{% if enable_prometheus_memcached_exporter | bool %}
- job_name: memcached
static_configs:

View File

@ -0,0 +1,6 @@
---
features:
- |
Adds support for collecting Prometheus metrics from RabbitMQ. This is
enabled by default when Prometheus and RabbitMQ are enabled, and may be
disabled by setting ``enable_prometheus_rabbitmq_exporter`` to ``false``.