@@ -81,6 +81,9 @@ Below is a sample template that creates a Prometheus rule group, including one r
81
81
{
82
82
"record" : " instance:node_cpu_utilisation:rate5m" ,
83
83
"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
+ },
84
87
"enabled" : true
85
88
},
86
89
{
@@ -138,6 +141,7 @@ The `rules` section will have the following properties for recording rules.
138
141
| :---| :---| :---| :---|
139
142
| ` record ` | True | string | Recording rule name. This is the name that will be used for the new time series. |
140
143
| ` 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. |
141
145
| ` enabled ` | False | boolean | Enable/disable group. Default is true. |
142
146
143
147
@@ -149,7 +153,7 @@ The `rules` section will have the following properties for alerting rules.
149
153
| ` alert ` | False | string | Alert rule name |
150
154
| ` expression ` | True | string | PromQL expression to evaluate. |
151
155
| ` 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. |
153
157
| ` rules.annotations ` | False | object | Annotations key-value pairs to add to the alert. |
154
158
| ` enabled ` | False | boolean | Enable/disable group. Default is true. |
155
159
| ` rules.severity ` | False | integer | Alert severity. 0-4, default is 3 (informational) |
0 commit comments