-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Review request for Microsoft.AlertsManagement to add …
…version stable/2023-03-01 (#22284) * Adds base for updating Microsoft.AlertsManagement from version preview/2021-07-22-preview to version 2023-03-01 * Updates readme * Updates API version in new specs and examples * adding PrometheusRuleGroups stable api-version * rename example titles * improve descriptions * improve examples * fix lintdiff errors * add pattern to rule name * fix pattern * remove validations * add recomandations * change actions * change to last acions property version * run prettier * fix PR review comments --------- Co-authored-by: Moshe Malka <momalka@microsoft.com>
- Loading branch information
Showing
8 changed files
with
1,118 additions
and
1 deletion.
There are no files selected for viewing
505 changes: 505 additions & 0 deletions
505
...t/resource-manager/Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json
Large diffs are not rendered by default.
Oops, something went wrong.
182 changes: 182 additions & 0 deletions
182
...rosoft.AlertsManagement/stable/2023-03-01/examples/createOrUpdatePrometheusRuleGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "promResourceGroup", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2023-03-01", | ||
"parameters": { | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ager/Microsoft.AlertsManagement/stable/2023-03-01/examples/deletePrometheusRuleGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "promResourceGroup", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2023-03-01" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...manager/Microsoft.AlertsManagement/stable/2023-03-01/examples/getPrometheusRuleGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "promResourceGroup", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2023-03-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
128 changes: 128 additions & 0 deletions
128
...nager/Microsoft.AlertsManagement/stable/2023-03-01/examples/listPrometheusRuleGroups.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "promResourceGroup", | ||
"api-version": "2023-03-01" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroupName1", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroupName2", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the following rule group", | ||
"enabled": true, | ||
"interval": "PT10M", | ||
"clusterName": "myClusterName", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace" | ||
], | ||
"rules": [ | ||
{ | ||
"record": "job_type:billing_jobs_duration_seconds:99p5m", | ||
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))", | ||
"labels": { | ||
"team": "prod" | ||
} | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"enabled": true, | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
}, | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup", | ||
"actionProperties": { | ||
"key21": "value21", | ||
"key22": "value22" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.