-
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] Publish private branch 'release-alertsmanagement-Micr…
…osoft.AlertsManagement-2021-07-22-preview' (#21307) * Adds base for updating Microsoft.AlertsManagement from version preview/2021-08-08-preview to version 2021-07-22-preview * Updates readme * Updates API version in new specs and examples * add prometheusRuleGroup * update readme * reorder * add prometheuse to default tag * remove location * add example * update example name * fix name * fix name * remove operations * remove patch * remove example * update patch * fix typo * add type * wip * prettier * add operations api example * fix operations api example issue * add prometheus to default tag * put should be able to return 201 for newly created resources, as well as 200 for updates * remove redundant * remove provisioning state * improve description * add 201 to create or update example * change api version Co-authored-by: Moshe Malka <momalka@microsoft.com>
- Loading branch information
Showing
9 changed files
with
1,009 additions
and
2 deletions.
There are no files selected for viewing
497 changes: 497 additions & 0 deletions
497
...e-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json
Large diffs are not rendered by default.
Oops, something went wrong.
158 changes: 158 additions & 0 deletions
158
...ertsManagement/preview/2021-07-22-preview/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,158 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "giladstest", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2021-07-22-preview", | ||
"parameters": { | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the first rule group", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" | ||
], | ||
"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))" | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the first rule group", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" | ||
], | ||
"interval": "PT5M", | ||
"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))" | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"systemData": { | ||
"createdBy": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-12T22:05:09Z" | ||
} | ||
} | ||
}, | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the first rule group", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" | ||
], | ||
"interval": "PT5M", | ||
"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))" | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"severity": 2, | ||
"for": "PT5M", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"annotations": { | ||
"annotationName1": "annotationValue1" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "PT10M" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"systemData": { | ||
"createdBy": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-12T22:05:09Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...osoft.AlertsManagement/preview/2021-07-22-preview/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": "giladsteset", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2021-07-22-preview" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...icrosoft.AlertsManagement/preview/2021-07-22-preview/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,60 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "giladstest", | ||
"ruleGroupName": "myPrometheusRuleGroup", | ||
"api-version": "2021-07-22-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "global", | ||
"properties": { | ||
"description": "This is the description of the first rule group", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" | ||
], | ||
"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))" | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"severity": 2, | ||
"for": "5m", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "10m" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"systemData": { | ||
"createdBy": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-12T22:05:09Z" | ||
} | ||
} | ||
} | ||
} | ||
} |
63 changes: 63 additions & 0 deletions
63
...rosoft.AlertsManagement/preview/2021-07-22-preview/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,63 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", | ||
"resourceGroupName": "giladstest", | ||
"api-version": "2021-07-22-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", | ||
"type": "Microsoft.AlertsManagement/prometheusRuleGroups", | ||
"location": "East US", | ||
"properties": { | ||
"description": "This is the description of the first rule group", | ||
"scopes": [ | ||
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" | ||
], | ||
"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))" | ||
}, | ||
{ | ||
"alert": "Billing_Processing_Very_Slow", | ||
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", | ||
"severity": 2, | ||
"for": "5m", | ||
"labels": { | ||
"team": "prod" | ||
}, | ||
"resolveConfiguration": { | ||
"autoResolved": true, | ||
"timeToResolve": "10m" | ||
}, | ||
"actions": [ | ||
{ | ||
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", | ||
"actionProperties": { | ||
"key11": "value11", | ||
"key12": "value12" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"systemData": { | ||
"createdBy": "abc@microsoft.com", | ||
"createdByType": "User", | ||
"createdAt": "2018-06-12T22:05:09Z", | ||
"lastModifiedBy": "xyz@microsoft.com", | ||
"lastModifiedByType": "User", | ||
"lastModifiedAt": "2018-06-12T22:05:09Z" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.