formula-prometheus/prometheus/map.jinja
Bartosz Kupidura 9b3d774430 We need empty {} to evaluate alerts
For some alerts we use reclass to get variables
(ex. threshold). To get those reclass variables
we use `prometheus_server` dict, which on nodes
without prometheus class is None.
We need to provide at least empty dict in that
case.

Change-Id: Ic1f2c1776c4852701dcf9f8a76f933926b2d9aec
2017-06-22 15:27:49 +02:00

9 lines
245 B
Django/Jinja

{% set server = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:server')) %}
{% set alertmanager = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:alertmanager')) %}