1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #
- # /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 %}
- - job_name: bind
- static_configs:
- - targets:
- {%- for node, node_config in salt['pillar.get']('nodes').items()|sort %}
- {%- if salt['ffho.any_item_in_list'](['dns-auth', 'dns-recursor'], node_config.get('roles', [])) %}
- - {{ node }}:9119
- {%- endif %}
- {%- endfor %}
|