mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-23 18:06:58 +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 }}
|
{% for comment in comments %}# {{ comment | strip }}
|
||||||
{% endfor %}- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
{% endfor %}- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
||||||
expr: {{ rule.query }}
|
expr: {{ rule.query }}
|
||||||
for: 5m
|
for: {% if rule.for %}{{ rule.for }}{% else %}5m{% endif %}
|
||||||
labels:
|
labels:
|
||||||
severity: {{ rule.severity }}
|
severity: {{ rule.severity }}
|
||||||
annotations:
|
annotations:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue