]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
bb0a8fcae518f45f51c682fa25d8b3ca22d8e66b
[ceph.git] / ceph / src / pybind / mgr / cephadm / templates / services / prometheus / prometheus.yml.j2
1 # {{ cephadm_managed }}
2 global:
3 scrape_interval: 10s
4 evaluation_interval: 10s
5 rule_files:
6 - /etc/prometheus/alerting/*
7 {% if alertmgr_targets %}
8 alerting:
9 alertmanagers:
10 - scheme: http
11 static_configs:
12 - targets: [{{ alertmgr_targets|join(', ') }}]
13 {% endif %}
14 scrape_configs:
15 - job_name: 'ceph'
16 honor_labels: true
17 static_configs:
18 - targets:
19 {% for mgr in mgr_scrape_list %}
20 - '{{ mgr }}'
21 {% endfor %}
22
23 {% if nodes %}
24 - job_name: 'node'
25 static_configs:
26 {% for node in nodes %}
27 - targets: ['{{ node.url }}']
28 labels:
29 instance: '{{ node.hostname }}'
30 {% endfor %}
31 {% endif %}
32
33 {% if haproxy_targets %}
34 - job_name: 'haproxy'
35 static_configs:
36 {% for haproxy in haproxy_targets %}
37 - targets: [{{ haproxy.url }}]
38 labels:
39 instance: '{{ haproxy.service }}'
40 {% endfor %}
41 {% endif %}