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
This commit is contained in:
Bartosz Kupidura 2017-06-22 14:58:19 +02:00
parent 45d0bb8fe7
commit 9b3d774430

View file

@ -1,5 +1,9 @@
{% set server = salt['grains.filter_by']({ {% set server = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:server')) %} }, merge=salt['pillar.get']('prometheus:server')) %}
{% set alertmanager = salt['grains.filter_by']({ {% set alertmanager = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:alertmanager')) %} }, merge=salt['pillar.get']('prometheus:alertmanager')) %}