Merge "[prometheus] Enable ceph mgr exporter"

This commit is contained in:
Zuul 2018-08-30 07:09:48 +00:00 committed by Gerrit Code Review
commit cfee876895
5 changed files with 25 additions and 0 deletions

View File

@ -281,6 +281,7 @@ prometheus_node_exporter_port: "9100"
prometheus_mysqld_exporter_port: "9104"
prometheus_haproxy_exporter_port: "9101"
prometheus_memcached_exporter_port: "9150"
prometheus_ceph_mgr_exporter_port: "9283"
# Default cadvisor port of 8080 already in use
prometheus_cadvisor_port: "18080"
@ -856,4 +857,5 @@ enable_prometheus_node_exporter: "{{ enable_prometheus | bool }}"
enable_prometheus_memcached_exporter: "{{ enable_memcached | bool }}"
enable_prometheus_cadvisor: "{{ enable_prometheus | bool }}"
enable_prometheus_alertmanager: "{{ enable_prometheus | bool }}"
enable_prometheus_ceph_mgr_exporter: "{{ enable_ceph | bool and enable_prometheus | bool }}"
prometheus_alertmanager_user: "admin"

View File

@ -31,3 +31,9 @@
- "{{ node_config_directory }}/ceph-mgr/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla"
- name: Enable the ceph mgr prometheus module
command: docker exec ceph_mgr ceph mgr module enable prometheus
when:
- inventory_hostname in groups['ceph-mgr']
- enable_prometheus_ceph_mgr_exporter | bool

View File

@ -58,6 +58,16 @@ scrape_configs:
{% endfor %}
{% endif %}
{% if enable_prometheus_ceph_mgr_exporter | bool %}
- job_name: ceph_mgr_exporter
honor_labels: true
static_configs:
- targets:
{% for host in groups["ceph-mgr"] %}
- '{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ hostvars[host]['prometheus_ceph_mgr_exporter_port'] }}'
{% endfor %}
{% endif %}
{% if enable_prometheus_alertmanager | bool %}
alerting:
alertmanagers:

View File

@ -504,3 +504,4 @@ tempest_floating_network_name:
#enable_prometheus_cadvisor: "{{ enable_prometheus | bool }}"
#enable_prometheus_memcached: "{{ enable_prometheus | bool }}"
#enable_prometheus_alertmanager: "{{ enable_prometheus | bool }}"
#enable_prometheus_ceph_mgr_exporter: "{{ enable_prometheus | bool and enable_ceph | bool }}"

View File

@ -0,0 +1,6 @@
---
features:
- |
Exposed a config option to enable the ceph manager prometheus
plugin, this also enables the exporter on the prometheus-server
configuration for each ceph-mgr host.