2017-03-09 06:12:27 -05:00
|
|
|
{% from "prometheus/map.jinja" import server with context %}
|
|
|
|
{%- if server.enabled %}
|
|
|
|
|
2017-05-09 03:45:44 -04:00
|
|
|
{%- if pillar.docker is defined and pillar.docker.host is defined %}
|
2017-03-09 06:12:27 -05:00
|
|
|
|
2017-05-17 10:00:52 -04:00
|
|
|
{{server.dir.config}}:
|
|
|
|
file.directory:
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
{{server.dir.data}}:
|
|
|
|
file.directory:
|
|
|
|
- makedirs: True
|
|
|
|
- mode: 755
|
|
|
|
|
2017-03-09 06:12:27 -05:00
|
|
|
{{server.dir.config}}/prometheus.yml:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://prometheus/files/prometheus.yml
|
|
|
|
- template: jinja
|
2017-05-17 10:00:52 -04:00
|
|
|
- require:
|
|
|
|
- file: {{server.dir.config}}
|
2017-03-09 06:12:27 -05:00
|
|
|
|
|
|
|
{{server.dir.config}}/alerts.yml:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://prometheus/files/alerts.yml
|
|
|
|
- template: jinja
|
2017-05-17 10:00:52 -04:00
|
|
|
- require:
|
|
|
|
- file: {{server.dir.config}}
|
2017-03-09 06:12:27 -05:00
|
|
|
|
|
|
|
{%- endif %}
|
|
|
|
{%- endif %}
|