prometheus.sls 797 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #
  2. # Grafana as Prometheus front end
  3. #
  4. #
  5. # Data sources
  6. #
  7. /etc/grafana/provisioning/datasources/prom-local.yaml:
  8. file.managed:
  9. - source: salt://grafana/datasources/prom-local.yaml.tmpl
  10. - template: jinja
  11. - require:
  12. - pkg: grafana
  13. - watch_in:
  14. - service: grafana-server
  15. #
  16. # Dashboards
  17. #
  18. /etc/grafana/provisioning/dashboards/FFHO.yaml:
  19. file.managed:
  20. - source: salt://grafana/dashboards/prometheus.yaml
  21. - require:
  22. - pkg: grafana
  23. - watch_in:
  24. - service: grafana-server
  25. /var/lib/grafana/dashboards/:
  26. file.recurse:
  27. - source: salt://grafana/dashboards/prometheus/
  28. - file_mode: 644
  29. - dir_mode: 755
  30. - user: root
  31. - group: root
  32. - clean: True
  33. - require:
  34. - pkg: grafana
  35. - watch_in:
  36. - service: grafana-server