prometheus.yml 792 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # /etc/prometheus/prometheus.yaml (Salt managed)
  3. #
  4. global:
  5. scrape_interval: 30s
  6. evaluation_interval: 1m
  7. # scrape_timeout is set to the global default (10s).
  8. external_labels:
  9. monitor: '{{ grains['id'] }}'
  10. #alerting:
  11. # alertmanagers:
  12. # - static_configs:
  13. # - targets: ['localhost:9093']
  14. #
  15. ## Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
  16. #rule_files:
  17. # # - "first_rules.yml"
  18. # # - "second_rules.yml"
  19. scrape_configs:
  20. - job_name: 'prometheus'
  21. scrape_interval: 5s
  22. scrape_timeout: 5s
  23. static_configs:
  24. - targets: ['localhost:9090']
  25. - job_name: node
  26. static_configs:
  27. - targets:
  28. {%- for node, node_config in salt['pillar.get']('nodes').items()|sort %}
  29. - {{ node }}:9100
  30. {%- endfor %}