Skip to content

Commit 2d748ed

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

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Azure managed Prometheus rule groups follow the structure and terminology of the
3131
3232
### Limiting rules to a specific cluster
3333

34-
You can optionally limit the rules in a rule group to query data originating from a specific cluster, by adding a cluster scope to your rule group, and/or by using the rule group `clusterName` property.
34+
You can optionally limit the rules in a rule group to query data originating from a single specific cluster, by adding a cluster scope to your rule group, and/or by using the rule group `clusterName` property.
3535
You should limit rules to a single cluster if your Azure Monitor workspace contains a large amount of data from multiple clusters. In such a case, there's a concern that running a single set of rules on all the data may cause performance or throttling issues. By using the cluster scope, you can create multiple rule groups, each configured with the same rules, with each group covering a different cluster.
3636

3737
To limit your rule group to a cluster scope, you should add the Azure Resource ID of your cluster to the rule group **scopes[]** list. **The scopes list must still include the Azure Monitor workspace resource ID**. The following cluster resource types are supported as a cluster scope:
@@ -76,7 +76,7 @@ The basic steps are as follows:
7676
2. Deploy the template using any deployment method, such as [Azure portal](../../azure-resource-manager/templates/deploy-portal.md), [Azure CLI](../../azure-resource-manager/templates/deploy-cli.md), [Azure PowerShell](../../azure-resource-manager/templates/deploy-powershell.md), or [Rest API](../../azure-resource-manager/templates/deploy-rest.md).
7777

7878
### Template example for a Prometheus rule group
79-
Following is a sample template that creates a Prometheus rule group, including one recording rule and one alert rule. This template creates a resource of type `Microsoft.AlertsManagement/prometheusRuleGroups`. The rules are executed in the order they appear within a group.
79+
Following is a sample template that creates a Prometheus rule group, including one recording rule and one alert rule. This template creates a resource of type `Microsoft.AlertsManagement/prometheusRuleGroups`. The scope of this group is limited to a single AKS cluster. The rules are executed in the order they appear within a group.
8080

8181
``` json
8282
{
@@ -93,7 +93,8 @@ Following is a sample template that creates a Prometheus rule group, including o
9393
"properties": {
9494
"description": "Sample Prometheus Rule Group",
9595
"scopes": [
96-
"/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.monitor/accounts/<azure-monitor-workspace-name>"
96+
"/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.monitor/accounts/<azure-monitor-workspace-name>",
97+
"/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.containerservice/managedclusters/<myClusterName>"
9798
],
9899
"enabled": true,
99100
"clusterName": "<myCLusterName>",
@@ -148,11 +149,11 @@ The rule group contains the following properties.
148149
| `name` | True | string | Prometheus rule group name |
149150
| `type` | True | string | `Microsoft.AlertsManagement/prometheusRuleGroups` |
150151
| `apiVersion` | True | string | `2023-03-01` |
151-
| `location` | True | string | Resource location from regions supported in the preview |
152-
| `properties.description` | False | string | Rule group description |
153-
| `properties.scopes` | True | string[] | Target Azure Monitor workspace. Only one scope currently supported |
152+
| `location` | True | string | Resource location from regions supported in the preview. |
153+
| `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. |
154155
| `properties.enabled` | False | boolean | Enable/disable group. Default is true. |
155-
| `properties.clusterName` | False | string | Apply rule to data from a specific cluster. Default is apply to all data in workspace. |
156+
| `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[]. |
156157
| `properties.interval` | False | string | Group evaluation interval. Default = PT1M |
157158

158159
### Recording rules

0 commit comments

Comments
 (0)