Merge "Add missing prometheus port for ceph auto discover"

This commit is contained in:
Zuul 2018-12-19 16:25:22 +00:00 committed by Gerrit Code Review
commit f7552334ba
2 changed files with 4 additions and 8 deletions

View File

@ -197,12 +197,8 @@
ceph_prometheus_enabled: |-
{% set ceph_detect = false %}
{% if ceph_prometheus_listening is defined %}
{% if (ceph_mons is defined) and (ceph_mons | length > 0) and (inventory_hostname in groups[ceph_metricbeat_group]) %}
{% set ceph_detect = true %}
{% else %}
{% set ceph_detect = ceph.stat.exists | bool %}
{% endif %}
{% if ceph_prometheus_listening is defined and (inventory_hostname in groups[ceph_metricbeat_group]) %}
{% set ceph_detect = true %}
{% endif %}
{{ ceph_detect }}

View File

@ -458,7 +458,7 @@ metricbeat.modules:
{% if (prometheus_enabled | default(false) | bool) and (prometheus_config is defined) %}
{% for prometheus in prometheus_config %}
- module: prometheus
metricsets: [{% for mset in prometheus.metricsets|default("collector") %}"{{ mset }}"{% if not loop.last %},{% endif %}{% endfor %}]
metricsets: [{% for mset in prometheus.metricsets|default(["collector"]) %}"{{ mset }}"{% if not loop.last %},{% endif %}{% endfor %}]
enabled: {{ prometheus.enabled | default('true') }}
period: {{ prometheus.period | default("10s") }}
hosts: [{% for phost in prometheus.hosts %}"{{ phost }}"{% if not loop.last %},{% endif %}{% endfor %}]
@ -472,7 +472,7 @@ metricbeat.modules:
metricsets: ["collector"]
enabled: 'true'
period: "10s"
hosts: [{% for phost in ceph_stats_hosts %}"{{ phost | regex_replace(':\\d+$', '') }}"{% if not loop.last %},{% endif %}{% endfor %}]
hosts: [{% for phost in ceph_stats_hosts %}"{{ phost | regex_replace(':\\d+$', '') }}:9283"{% if not loop.last %},{% endif %}{% endfor %}]
metrics_path: "/metrics"
namespace: ceph
#