# # /etc/prometheus/prometheus.yaml (Salt managed) # global: scrape_interval: 30s evaluation_interval: 1m # scrape_timeout is set to the global default (10s). external_labels: monitor: '{{ grains['id'] }}' #alerting: # alertmanagers: # - static_configs: # - targets: ['localhost:9093'] # ## Load rules once and periodically evaluate them according to the global 'evaluation_interval'. #rule_files: # # - "first_rules.yml" # # - "second_rules.yml" scrape_configs: - job_name: 'prometheus' scrape_interval: 5s scrape_timeout: 5s static_configs: - targets: ['localhost:9090'] - job_name: node static_configs: - targets: {%- for node, node_config in salt['pillar.get']('nodes').items()|sort %} - {{ node }}:9100 {%- endfor %}