Support for statement in alerts.
This commit is contained in:
parent
2780f793b7
commit
5387f75417
|
@ -59,6 +59,7 @@ Configure prometheus server
|
||||||
alert:
|
alert:
|
||||||
PrometheusTargetDown:
|
PrometheusTargetDown:
|
||||||
if: 'up != 1'
|
if: 'up != 1'
|
||||||
|
for: 5m
|
||||||
labels:
|
labels:
|
||||||
severity: down
|
severity: down
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
{%- if alert.get('enabled', True) %}
|
{%- if alert.get('enabled', True) %}
|
||||||
ALERT {{ alertname }}
|
ALERT {{ alertname }}
|
||||||
IF {{ alert.if }}
|
IF {{ alert.if }}
|
||||||
|
{%- if alert.for is defined %}
|
||||||
|
FOR {{ alert.for }}
|
||||||
|
{%- endif %}
|
||||||
{%- if alert.for is defined %}FOR {{ alert.for }}{%- endif %}
|
{%- if alert.for is defined %}FOR {{ alert.for }}{%- endif %}
|
||||||
{%- if alert.labels is defined %}
|
{%- if alert.labels is defined %}
|
||||||
LABELS {
|
LABELS {
|
||||||
|
|
Loading…
Reference in a new issue