Merge pull request #3 from storiesbi/alerts-for
Support for statement in alerts.
This commit is contained in:
commit
c48201aabe
2 changed files with 4 additions and 0 deletions
|
@ -59,6 +59,7 @@ Configure prometheus server
|
|||
alert:
|
||||
PrometheusTargetDown:
|
||||
if: 'up != 1'
|
||||
for: 5m
|
||||
labels:
|
||||
severity: down
|
||||
annotations:
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue