mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 08:57:19 +08:00
feat(alert template): custom "for" duration
This commit is contained in:
parent
d3ecfaaad3
commit
a6bf7d1168
1 changed files with 1 additions and 1 deletions
2
rules.md
2
rules.md
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue