Skip to content

Commit

Permalink
[Hub Generated] Publish private branch 'release-alertsmanagement-Micr…
Browse files Browse the repository at this point in the history
…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
moshemal and Moshe Malka authored Nov 7, 2022
1 parent e77f2f0 commit bf08c36
Show file tree
Hide file tree
Showing 9 changed files with 1,009 additions and 2 deletions.

Large diffs are not rendered by default.

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"
}
}
}
}
}
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": {}
}
}
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"
}
}
}
}
}
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"
}
}
]
}
}
}
}
Loading

0 comments on commit bf08c36

Please sign in to comment.