mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 00:47:18 +08:00
adding comments in data structure
This commit is contained in:
parent
c70a5089c7
commit
dfa5446cd5
2 changed files with 7 additions and 0 deletions
|
|
@ -65,6 +65,10 @@ services:
|
|||
description: Context switching is growing on node (> 1000 / s)
|
||||
query: 'rate(node_context_switches_total[5m]) > 1000'
|
||||
severity: warning
|
||||
comments: |
|
||||
1000 context switches is an arbitrary number.
|
||||
Alert threshold depends on nature of application.
|
||||
Please read: https://github.com/samber/awesome-prometheus-alerts/issues/58
|
||||
- name: Swap is filling up
|
||||
description: Swap is filling up (>80%)
|
||||
query: '(1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) * 100 > 80'
|
||||
|
|
|
|||
3
rules.md
3
rules.md
|
|
@ -71,6 +71,7 @@ groups:
|
|||
<ul>
|
||||
{% for rule in exporter.rules %}
|
||||
{% assign ruleIndex = forloop.index %}
|
||||
{% assign comments = rule.comments | strip | newline_to_br | split: '<br />' %}
|
||||
<li>
|
||||
<h4>
|
||||
{{ serviceIndex }}.{{ ruleIndex }}.
|
||||
|
|
@ -86,6 +87,8 @@ groups:
|
|||
{% capture ruleNameCamelcase %}{% for word in ruleName %}{{ word | capitalize }} {% endfor %}{% endcapture %}
|
||||
|
||||
{% highlight yaml %}
|
||||
{% for comment in comments %}# {{ comment | strip }}
|
||||
{% endfor %}
|
||||
- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
||||
expr: {{ rule.query }}
|
||||
for: 5m
|
||||
|
|
|
|||
Loading…
Reference in a new issue