init.sls 646 B

1234567891011121314151617181920212223242526272829303132
  1. #
  2. # Set up prometheus server
  3. #
  4. prometheus:
  5. pkg.installed:
  6. - name: prometheus
  7. service.running:
  8. - enable: true
  9. - restart: true
  10. /srv/prometheus/metrics2:
  11. file.directory:
  12. - makedirs: true
  13. - user: prometheus
  14. - group: prometheus
  15. /etc/default/prometheus:
  16. file.managed:
  17. - source: salt://prometheus-server/prometheus.default
  18. - watch_in:
  19. - service: prometheus
  20. /etc/prometheus/prometheus.yml:
  21. file.managed:
  22. - source: salt://prometheus-server/prometheus.yml
  23. - template: jinja
  24. - require:
  25. - pkg: prometheus
  26. - file: /srv/prometheus/metrics2
  27. - watch_in:
  28. - service: prometheus