Skip to content

Commit da4e2d1

Browse files
authored
Update prometheus-rule-groups.md
Add support for cluster-centric alerts
1 parent 2d748ed commit da4e2d1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Azure Managed Prometheus rule groups, recording rules and alert rules can be cre
2424

2525
Azure managed Prometheus rule groups follow the structure and terminology of the open source Prometheus rule groups. Rule names, expression, 'for' clause, labels, annotations are all supported in the Azure version. The following key differences between OSS rule groups and Azure managed Prometheus should be noted:
2626
* Azure managed Prometheus rule groups are managed as Azure resources, and include necessary information for resource management, such as the subscription and resource group where the Azure rule group should reside.
27-
* Azure managed Prometheus alert rules include dedicated properities that allow alerts to be processed like other Azure Monitor alerts. For example, alert severity, action group association, and alert auto-resolve configuration are supported as part of Azure managed Prometheus alert rules.
27+
* Azure managed Prometheus alert rules include dedicated properties that allow alerts to be processed like other Azure Monitor alerts. For example, alert severity, action group association, and alert auto resolve configuration are supported as part of Azure managed Prometheus alert rules.
2828

2929
> [!NOTE]
3030
> For your AKS or ARC Kubernetes clusters, you can use some of the recommended alerts rules. See pre-defined alert rules [here](../containers/container-insights-metric-alerts.md#enable-prometheus-alert-rules).
@@ -39,7 +39,7 @@ To limit your rule group to a cluster scope, you should add the Azure Resource I
3939
* Azure Arc-enabled Kubernetes clusters (Microsoft.kubernetes/connectedClusters)
4040
* Azure connected appliances (Microsoft.ResourceConnector/appliances)
4141

42-
In addition to the cluster ID, you can configure the **clusterName** property of your rule group. The 'clusterName' property must match the `cluster` label that is added to your metrics when scraped from a specific cluster. By default, this label is set to the last part (resource name) of your cluster ID. If you've changed this label using the ['cluster_alias'](../essentials/prometheus-metrics-scrape-configuration.md#cluster-alias) setting in your cluster scraping configmap, you must include the updated value in the rule group 'clusterName' property. If your scraping uses the dafault 'cluster' label value, the 'clusterName' property is optional.
42+
In addition to the cluster ID, you can configure the **clusterName** property of your rule group. The 'clusterName' property must match the `cluster` label that is added to your metrics when scraped from a specific cluster. By default, this label is set to the last part (resource name) of your cluster ID. If you've changed this label using the ['cluster_alias'](../essentials/prometheus-metrics-scrape-configuration.md#cluster-alias) setting in your cluster scraping configmap, you must include the updated value in the rule group 'clusterName' property. If your scraping uses the default 'cluster' label value, the 'clusterName' property is optional.
4343

4444
Here's an example of how a rule group is configured to limit query to a specific cluster:
4545

@@ -128,7 +128,7 @@ Following is a sample template that creates a Prometheus rule group, including o
128128
},
129129
"actions": [
130130
{
131-
"actionGroupId": "/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.insights/actiongroups/<action-group-name>"
131+
"actionGroupID": "/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.insights/actiongroups/<action-group-name>"
132132
}
133133
]
134134
}
@@ -151,7 +151,7 @@ The rule group contains the following properties.
151151
| `apiVersion` | True | string | `2023-03-01` |
152152
| `location` | True | string | Resource location from regions supported in the preview. |
153153
| `properties.description` | False | string | Rule group description. |
154-
| `properties.scopes` | True | string[] | Must include the target Azure Monitor workspace Id. Can optionally include one additional cluster Id. |
154+
| `properties.scopes` | True | string[] | Must include the target Azure Monitor workspace ID. Can optionally include one more cluster ID, as well. |
155155
| `properties.enabled` | False | boolean | Enable/disable group. Default is true. |
156156
| `properties.clusterName` | False | string | Must match the `cluster` label that is added to metrics scraped from your target cluster. By default, set to the last part (resource name) of cluster ID that appears in scopes[]. |
157157
| `properties.interval` | False | string | Group evaluation interval. Default = PT1M |
@@ -173,7 +173,7 @@ The `rules` section contains the following properties for alerting rules.
173173
|:---|:---|:---|:---|:---|
174174
| `alert` | False | string | Alert rule name |
175175
| `expression` | True | string | PromQL expression to evaluate. |
176-
| `for` | False | string | Alert firing timeout. Values - 'PT1M', 'PT5M' etc. |
176+
| `for` | False | string | Alert firing timeout. Values - PT1M, PT5M etc. |
177177
| `labels` | False | object | labels key-value pairs | Prometheus alert rule labels. These labels are added to alerts fired by this rule. |
178178
| `rules.annotations` | False | object | Annotations key-value pairs to add to the alert. |
179179
| `enabled` | False | boolean | Enable/disable group. Default is true. |
@@ -186,10 +186,10 @@ The `rules` section contains the following properties for alerting rules.
186186

187187
If you have a [Prometheus rules configuration file](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#configuring-rules) (in YAML format), you can now convert it to an Azure Prometheus rule group ARM template, using the [az-prom-rules-converter utility](https://github.com/Azure/prometheus-collector/tree/main/tools/az-prom-rules-converter#az-prom-rules-converter). The rules file can contain definition of one or more rule groups.
188188

189-
In addition to the rules file, you must provide the utility with additional properties that are needed to create the Azure Prometheus rule groups, including: subscription, resource group, location, target Azure Monitor workspace, target cluster Id and name, and action groups (used for alert rules). The utility creates a template file that can be deployed directly or within a deployment pipe providing some of these properties as parameters. Properties that you provide to the utility are used for all the rule groups in the template. For example, all rule groups in the file are created in the same subscription, resource group and location, and using the same Azure Monitor workspace. If an action group is provided as a parameter to the utility, the same action group is used in all the alert rules in the template. If you want to change this default configuration (for example, use different action groups in different rules) you can edit the resulting template according to your needs, before deploying it.
189+
In addition to the rules file, you must provide the utility with other properties that are needed to create the Azure Prometheus rule groups, including: subscription, resource group, location, target Azure Monitor workspace, target cluster ID and name, and action groups (used for alert rules). The utility creates a template file that can be deployed directly or within a deployment pipe providing some of these properties as parameters. Properties that you provide to the utility are used for all the rule groups in the template. For example, all rule groups in the file are created in the same subscription, resource group and location, and using the same Azure Monitor workspace. If an action group is provided as a parameter to the utility, the same action group is used in all the alert rules in the template. If you want to change this default configuration (for example, use different action groups in different rules) you can edit the resulting template according to your needs, before deploying it.
190190

191191
> [!NOTE]
192-
> !The az-prom-convert-utility is provided as a courtesy tool. We recommend that you review the resulting template and verify it matches your intended configuration.
192+
> The az-prom-convert-utility is provided as a courtesy tool. We recommend that you review the resulting template and verify it matches your intended configuration.
193193
194194
### Creating Prometheus rule group using Azure CLI
195195

0 commit comments

Comments
 (0)