prometheus_config.j2 939 B

123456789101112131415161718192021222324252627282930
  1. global:
  2. scrape_interval: 15s # By default, scrape targets every 15 seconds.
  3. # Attach these labels to any time series or alerts when communicating with
  4. # external systems (federation, remote storage, Alertmanager).
  5. external_labels:
  6. monitor: 'ffdo'
  7. # A scrape configuration containing exactly one endpoint to scrape:
  8. # Here it's Prometheus itself.
  9. scrape_configs:
  10. - job_name: 'supernodes'
  11. scheme: https
  12. bearer_token: '{{ hostvars[groups['supernodes'][0]]['node_exporter_authorization_token'] }}'
  13. scrape_interval: 5s
  14. static_configs:
  15. - targets:
  16. {% for host in groups['supernodes'] %}
  17. - '{{ host }}'
  18. {% endfor %}
  19. - job_name: 'mapservers'
  20. scheme: https
  21. bearer_token: '{{ hostvars[groups['mapservers'][0]]['node_exporter_authorization_token'] }}'
  22. scrape_interval: 5s
  23. static_configs:
  24. - targets:
  25. {% for host in groups['mapservers'] %}
  26. - '{{ host }}'
  27. {% endfor %}