formula-prometheus/prometheus/map.jinja
Olivier Bourdon 31bfa9d94c Fix exporters configuration to be generic
Change-Id: If5cf3662f96311a5f37055c0f62934ba5407a978
2017-07-11 16:07:45 +02:00

19 lines
514 B
Django/Jinja

{% set server = salt['grains.filter_by']({
'default': {
'target': {
'static': {
},
},
},
}, merge=salt['pillar.get']('prometheus:server')) %}
{% set alertmanager = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:alertmanager')) %}
{% set exporters = salt['grains.filter_by']({
'default': {
},
}, merge=salt['pillar.get']('prometheus:exporters')) %}
{%- do salt['defaults.merge'](exporters, grains.get('prometheus', {}).get('exporters', {})) %}