Skip to content

Commit c0ec081

Browse files
Merge pull request #219599 from yairgil/patch-7
Update prometheus-rule-groups.md
2 parents 9127577 + a501e00 commit c0ec081

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

articles/azure-monitor/essentials/prometheus-rule-groups.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ Below is a sample template that creates a Prometheus rule group, including one r
8181
{
8282
"record": "instance:node_cpu_utilisation:rate5m",
8383
"expression": "1 - avg without (cpu) (sum without (mode)(rate(node_cpu_seconds_total{job=\"node\", mode=~\"idle|iowait|steal\"}[5m])))",
84+
"labels": {
85+
"workload_type": "job"
86+
},
8487
"enabled": true
8588
},
8689
{
@@ -138,6 +141,7 @@ The `rules` section will have the following properties for recording rules.
138141
|:---|:---|:---|:---|
139142
| `record` | True | string | Recording rule name. This is the name that will be used for the new time series. |
140143
| `expression` | True | string | PromQL expression to calculate the new time series value. |
144+
| `labels` | True | string | Prometheus rule labels key-value pairs, will be added to the recorded time series. |
141145
| `enabled` | False | boolean | Enable/disable group. Default is true. |
142146

143147

@@ -149,7 +153,7 @@ The `rules` section will have the following properties for alerting rules.
149153
| `alert` | False | string | Alert rule name |
150154
| `expression` | True | string | PromQL expression to evaluate. |
151155
| `for` | False | string | Alert firing timeout. Values - 'PT1M', 'PT5M' etc. |
152-
| `labels` | False | object | labels key-value pairs | Prometheus alert rule labels |
156+
| `labels` | False | object | labels key-value pairs | Prometheus alert rule labels, will be added to the fired alert. |
153157
| `rules.annotations` | False | object | Annotations key-value pairs to add to the alert. |
154158
| `enabled` | False | boolean | Enable/disable group. Default is true. |
155159
| `rules.severity` | False | integer | Alert severity. 0-4, default is 3 (informational) |

0 commit comments

Comments
 (0)