formula-prometheus/prometheus/alerta.sls
Dmitry Kalashnik 38242186dd Add alerta to prometheus
Change-Id: I0349936dc683475e18155cf5f8ca750d06482cfb
2018-04-25 15:39:59 +04:00

21 lines
460 B
Text

{% from "prometheus/map.jinja" import alerta with context %}
{%- if alerta.enabled %}
alerta_config_dir:
file.directory:
- name: {{ alerta.config_dir }}
- makedirs: True
- mode: 755
alerta_config_file:
file.managed:
- name: {{ alerta.config_dir }}/alerta.conf
- source: salt://prometheus/files/alerta/alerta.conf
- makedirs: True
- mode: 755
- template: jinja
- require:
- file: alerta_config_dir
{%- endif %}