# -*- coding: utf-8 -*- # vim: ft=yaml --- chaos-role: - prometheus-master - prometheus-node_exporter prometheus: wanted: - prometheus - node_exporter service: prometheus: args: web.listen-address: 0.0.0.0:9090 config: prometheus: global: external_labels: monitor: '.chaos' scrape_configs: - job_name: 'prometheus' static_configs: - targets: - prometheus.chaos:9090 - job_name: mysqld static_configs: - targets: - tumor.chaos:9104 - job_name: mqtt.mosquitto static_configs: - targets: - mqtt.chaos:9234 - job_name: haproxy static_configs: - targets: - drucki.chaos:9101 - job_name: klipper static_configs: - targets: - drucki.chaos:3903 - job_name: 'node' static_configs: - targets: - dumont.chaos:9100 {% set roles = salt.saltutil.runner('mine.get', tgt='*', fun='chaos_roles', tgt_type='glob' ) %} {% for host,role in roles.items() %} {% if 'prometheus-node_exporter' in role %} - {{ host }}{{ salt['pillar.get']('prometheus:service:node_exporter:args:web.listen-address', ':9100') }} {% endif %} {% endfor %}