-
Notifications
You must be signed in to change notification settings - Fork 9
/
human_readable.html
71 lines (59 loc) · 3.32 KB
/
human_readable.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<h1>Validation rules</h1>
<h2><a href="#check-severity-label">check-severity-label</a></h2>
<ul>
<li>Alert has labels: <code>severity</code></li>
<li>Alert label <code>severity</code> has one of the allowed values: <code>info</code>,<code>warning</code>,<code>critical</code></li>
<li>Alert if rule has label <code>severity</code> with value <code>info</code> , it cannot have label <code>page</code></li>
<li>Alert expression can be successfully evaluated on the live Prometheus instance</li>
<li>Alert expression uses only labels that are actually present in Prometheus</li>
<li>Alert expression does not use irate</li>
<li>Alert expression selectors actually matches any series in Prometheus</li>
<li>Alert expression does not use data older than <code>6h0m0s</code></li>
</ul>
<h2><a href="#check-team-label">check-team-label</a></h2>
<ul>
<li>Alert has labels: <code>xxx</code></li>
<li>Alert label <code>team</code> has one of the allowed values: <code>[email protected]</code> (templated values are ignored)</li>
</ul>
<h2><a href="#check-playbook-annotation">check-playbook-annotation</a></h2>
<ul>
<li>Alert has any of these annotations: <code>playbook</code>,<code>link</code></li>
<li>Alert Annotation <code>link</code> is a valid URL and does not return HTTP status 404</li>
</ul>
<h2><a href="#check-alert-title">check-alert-title</a></h2>
<ul>
<li>Alert has all of these annotations: <code>title</code></li>
</ul>
<h2><a href="#check-prometheus-limitations">check-prometheus-limitations</a></h2>
<ul>
<li>All rules expression does not use any experimental PromQL functions</li>
<li>All rules expression uses underscores as separators in large numbers in PromQL expression. Example: 1_000_000</li>
<li>All rules expression does not use data older than <code>6h0m0s</code></li>
<li>All rules does not use any of the <code>cluster</code>,<code>locality</code>,<code>prometheus-type</code>,<code>replica</code> labels is in its expression</li>
</ul>
<h2><a href="#check-metric-name">check-metric-name</a></h2>
<ul>
<li>Alert expression uses metric name in selectors</li>
<li>Alert labels are valid templates</li>
<li>Alert <code>keep_firing_for</code> is not longer than <code>1h</code></li>
</ul>
<h2><a href="#check-groups">check-groups</a></h2>
<ul>
<li>Group evaluation interval is between <code>20s</code> and <code>106751d23h47m16s854ms</code> if set</li>
<li>Group has at most 10 rules</li>
<li>Group does not have higher <code>limit</code> configured then 100</li>
</ul>
<h2><a href="#check-formatting">check-formatting</a></h2>
<ul>
<li>All rules expression is well formatted as would <code>promtool promql format</code> do or similar online tool such as https://o11y.tools/promqlparser/</li>
<li>All rules expression does not do any binary operations between histogram buckets, it can be dangerous because of inconsistency in the data if sent over remote write for example</li>
</ul>
<h2><a href="#check-recording-rules">check-recording-rules</a></h2>
<ul>
<li>Recording rule Recorded metric name does not match regexp: ^foo_bar$</li>
<li>Recording rule Recorded metric name matches regexp: [^:]+:[^:]+:[^:]+</li>
</ul>
<h2><a href="#another-checks">another-checks</a></h2>
<ul>
<li>All rules labels does not have empty values</li>
</ul>