Merge pull request #3 from storiesbi/alerts-for

Support for statement in alerts.
This commit is contained in:
Michael Kutý 2017-05-16 16:01:00 +02:00 committed by GitHub
commit c48201aabe
2 changed files with 4 additions and 0 deletions

View file

@ -59,6 +59,7 @@ Configure prometheus server
alert:
PrometheusTargetDown:
if: 'up != 1'
for: 5m
labels:
severity: down
annotations:

View file

@ -31,6 +31,9 @@
{%- if alert.get('enabled', True) %}
ALERT {{ alertname }}
IF {{ alert.if }}
{%- if alert.for is defined %}
FOR {{ alert.for }}
{%- endif %}
{%- if alert.for is defined %}FOR {{ alert.for }}{%- endif %}
{%- if alert.labels is defined %}
LABELS {