This repository has been archived on 2026-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
Set-OPS/roles/serveurs_prometheus/templates/prometheus.yml.j2

24 lines
797 B
Text
Raw Normal View History

# Gere par Set-OPS (role serveurs_prometheus). Ne pas editer a la main.
global:
scrape_interval: {{ serveurs_prometheus_intervalle }}
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ['localhost:9090']
- job_name: node
static_configs:
- targets: {{ groups.get(serveurs_prometheus_groupe_metriques, [])
| map('extract', hostvars)
| selectattr('ansible_host', 'defined')
| map(attribute='ansible_host')
| map('regex_replace', '$', ':' ~ serveurs_prometheus_port_node)
| list | to_json }}
{% for job in serveurs_prometheus_cibles_supplementaires %}
- job_name: {{ job.job }}
static_configs:
- targets: {{ job.cibles | to_json }}
{% endfor %}