feat(alert template): custom "for" duration

This commit is contained in:
Samuel Berthe 2020-12-30 19:07:26 +01:00
parent d3ecfaaad3
commit a6bf7d1168
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C

View file

@ -80,7 +80,7 @@
{% for comment in comments %}# {{ comment | strip }}
{% endfor %}- alert: {{ ruleNameCamelcase | remove: ' ' }}
expr: {{ rule.query }}
for: 5m
for: {% if rule.for %}{{ rule.for }}{% else %}5m{% endif %}
labels:
severity: {{ rule.severity }}
annotations: