Skip to content

Commit 793048d

Browse files
moshemalMoshe Malka
authored andcommitted
[Hub Generated] Publish private branch 'release-alertsmanagement-Microsoft.AlertsManagement-2021-07-22-preview' (Azure#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>
1 parent bb4817d commit 793048d

File tree

9 files changed

+1009
-2
lines changed

9 files changed

+1009
-2
lines changed

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json

Lines changed: 497 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "giladstest",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2021-07-22-preview",
7+
"parameters": {
8+
"location": "East US",
9+
"properties": {
10+
"description": "This is the description of the first rule group",
11+
"scopes": [
12+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount"
13+
],
14+
"rules": [
15+
{
16+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
17+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"
18+
},
19+
{
20+
"alert": "Billing_Processing_Very_Slow",
21+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
22+
"severity": 2,
23+
"for": "PT5M",
24+
"labels": {
25+
"team": "prod"
26+
},
27+
"annotations": {
28+
"annotationName1": "annotationValue1"
29+
},
30+
"resolveConfiguration": {
31+
"autoResolved": true,
32+
"timeToResolve": "PT10M"
33+
},
34+
"actions": [
35+
{
36+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2",
37+
"actionProperties": {
38+
"key11": "value11",
39+
"key12": "value12"
40+
}
41+
}
42+
]
43+
}
44+
]
45+
}
46+
}
47+
},
48+
"responses": {
49+
"200": {
50+
"headers": {},
51+
"body": {
52+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
53+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
54+
"location": "East US",
55+
"properties": {
56+
"description": "This is the description of the first rule group",
57+
"scopes": [
58+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount"
59+
],
60+
"interval": "PT5M",
61+
"rules": [
62+
{
63+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
64+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"
65+
},
66+
{
67+
"alert": "Billing_Processing_Very_Slow",
68+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
69+
"severity": 2,
70+
"for": "PT5M",
71+
"labels": {
72+
"team": "prod"
73+
},
74+
"annotations": {
75+
"annotationName1": "annotationValue1"
76+
},
77+
"resolveConfiguration": {
78+
"autoResolved": true,
79+
"timeToResolve": "PT10M"
80+
},
81+
"actions": [
82+
{
83+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2",
84+
"actionProperties": {
85+
"key11": "value11",
86+
"key12": "value12"
87+
}
88+
}
89+
]
90+
}
91+
]
92+
},
93+
"systemData": {
94+
"createdBy": "abc@microsoft.com",
95+
"createdByType": "User",
96+
"createdAt": "2018-06-12T22:05:09Z",
97+
"lastModifiedBy": "xyz@microsoft.com",
98+
"lastModifiedByType": "User",
99+
"lastModifiedAt": "2018-06-12T22:05:09Z"
100+
}
101+
}
102+
},
103+
"201": {
104+
"headers": {},
105+
"body": {
106+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
107+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
108+
"location": "East US",
109+
"properties": {
110+
"description": "This is the description of the first rule group",
111+
"scopes": [
112+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount"
113+
],
114+
"interval": "PT5M",
115+
"rules": [
116+
{
117+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
118+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"
119+
},
120+
{
121+
"alert": "Billing_Processing_Very_Slow",
122+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
123+
"severity": 2,
124+
"for": "PT5M",
125+
"labels": {
126+
"team": "prod"
127+
},
128+
"annotations": {
129+
"annotationName1": "annotationValue1"
130+
},
131+
"resolveConfiguration": {
132+
"autoResolved": true,
133+
"timeToResolve": "PT10M"
134+
},
135+
"actions": [
136+
{
137+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2",
138+
"actionProperties": {
139+
"key11": "value11",
140+
"key12": "value12"
141+
}
142+
}
143+
]
144+
}
145+
]
146+
},
147+
"systemData": {
148+
"createdBy": "abc@microsoft.com",
149+
"createdByType": "User",
150+
"createdAt": "2018-06-12T22:05:09Z",
151+
"lastModifiedBy": "xyz@microsoft.com",
152+
"lastModifiedByType": "User",
153+
"lastModifiedAt": "2018-06-12T22:05:09Z"
154+
}
155+
}
156+
}
157+
}
158+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "giladsteset",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2021-07-22-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"204": {}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "giladstest",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2021-07-22-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"headers": {},
11+
"body": {
12+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
13+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
14+
"location": "global",
15+
"properties": {
16+
"description": "This is the description of the first rule group",
17+
"scopes": [
18+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount"
19+
],
20+
"rules": [
21+
{
22+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
23+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"
24+
},
25+
{
26+
"alert": "Billing_Processing_Very_Slow",
27+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
28+
"severity": 2,
29+
"for": "5m",
30+
"labels": {
31+
"team": "prod"
32+
},
33+
"resolveConfiguration": {
34+
"autoResolved": true,
35+
"timeToResolve": "10m"
36+
},
37+
"actions": [
38+
{
39+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2",
40+
"actionProperties": {
41+
"key11": "value11",
42+
"key12": "value12"
43+
}
44+
}
45+
]
46+
}
47+
]
48+
},
49+
"systemData": {
50+
"createdBy": "abc@microsoft.com",
51+
"createdByType": "User",
52+
"createdAt": "2018-06-12T22:05:09Z",
53+
"lastModifiedBy": "xyz@microsoft.com",
54+
"lastModifiedByType": "User",
55+
"lastModifiedAt": "2018-06-12T22:05:09Z"
56+
}
57+
}
58+
}
59+
}
60+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "giladstest",
5+
"api-version": "2021-07-22-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"value": [
12+
{
13+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
14+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
15+
"location": "East US",
16+
"properties": {
17+
"description": "This is the description of the first rule group",
18+
"scopes": [
19+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount"
20+
],
21+
"rules": [
22+
{
23+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
24+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))"
25+
},
26+
{
27+
"alert": "Billing_Processing_Very_Slow",
28+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
29+
"severity": 2,
30+
"for": "5m",
31+
"labels": {
32+
"team": "prod"
33+
},
34+
"resolveConfiguration": {
35+
"autoResolved": true,
36+
"timeToResolve": "10m"
37+
},
38+
"actions": [
39+
{
40+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
41+
"actionProperties": {
42+
"key11": "value11",
43+
"key12": "value12"
44+
}
45+
}
46+
]
47+
}
48+
]
49+
},
50+
"systemData": {
51+
"createdBy": "abc@microsoft.com",
52+
"createdByType": "User",
53+
"createdAt": "2018-06-12T22:05:09Z",
54+
"lastModifiedBy": "xyz@microsoft.com",
55+
"lastModifiedByType": "User",
56+
"lastModifiedAt": "2018-06-12T22:05:09Z"
57+
}
58+
}
59+
]
60+
}
61+
}
62+
}
63+
}

0 commit comments

Comments
 (0)