Add FOR clause to alerting rules (when necessary)

This commit is contained in:
Samuel Berthe 2020-12-31 00:27:12 +01:00
parent 72f958eb06
commit 971bbe03ec
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C
2 changed files with 379 additions and 192 deletions

File diff suppressed because it is too large Load diff

View file

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