# -*- 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 log.level: warn config: prometheus: global: external_labels: monitor: '.chaos' scrape_configs: - job_name: 'prometheus' static_configs: - targets: - prometheus.chaos:9090 - job_name: 'ceph' static_configs: - targets: - pine02.chaos:9283 - 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 - riot01.chaos:9101 - job_name: klipper static_configs: - targets: - drucki.chaos:3903 - job_name: octoprint metrics_path: '/plugin/prometheus_exporter/metrics' static_configs: - targets: - drucki.chaos:80 - job_name: openhab2 metrics_path: '/' static_configs: - targets: - auto.chaos:9999 - 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 %}