Skip to content

Commit e744100

Browse files
moshemalMoshe Malka
authored andcommitted
[Hub Generated] Review request for Microsoft.AlertsManagement to add version stable/2023-03-01 (Azure#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 <[email protected]>
1 parent fc84285 commit e744100

File tree

8 files changed

+1118
-1
lines changed

8 files changed

+1118
-1
lines changed

specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json

Lines changed: 505 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "promResourceGroup",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2023-03-01",
7+
"parameters": {
8+
"location": "East US",
9+
"properties": {
10+
"description": "This is the description of the following rule group",
11+
"enabled": true,
12+
"interval": "PT10M",
13+
"clusterName": "myClusterName",
14+
"scopes": [
15+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
16+
],
17+
"rules": [
18+
{
19+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
20+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
21+
"labels": {
22+
"team": "prod"
23+
}
24+
},
25+
{
26+
"alert": "Billing_Processing_Very_Slow",
27+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
28+
"enabled": true,
29+
"severity": 2,
30+
"for": "PT5M",
31+
"labels": {
32+
"team": "prod"
33+
},
34+
"annotations": {
35+
"annotationName1": "annotationValue1"
36+
},
37+
"resolveConfiguration": {
38+
"autoResolved": true,
39+
"timeToResolve": "PT10M"
40+
},
41+
"actions": [
42+
{
43+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
44+
"actionProperties": {
45+
"key11": "value11",
46+
"key12": "value12"
47+
}
48+
},
49+
{
50+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
51+
"actionProperties": {
52+
"key21": "value21",
53+
"key22": "value22"
54+
}
55+
}
56+
]
57+
}
58+
]
59+
}
60+
}
61+
},
62+
"responses": {
63+
"200": {
64+
"headers": {},
65+
"body": {
66+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
67+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
68+
"location": "East US",
69+
"properties": {
70+
"description": "This is the description of the following rule group",
71+
"enabled": true,
72+
"interval": "PT10M",
73+
"clusterName": "myClusterName",
74+
"scopes": [
75+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
76+
],
77+
"rules": [
78+
{
79+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
80+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
81+
"labels": {
82+
"team": "prod"
83+
}
84+
},
85+
{
86+
"alert": "Billing_Processing_Very_Slow",
87+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
88+
"enabled": true,
89+
"severity": 2,
90+
"for": "PT5M",
91+
"labels": {
92+
"team": "prod"
93+
},
94+
"annotations": {
95+
"annotationName1": "annotationValue1"
96+
},
97+
"resolveConfiguration": {
98+
"autoResolved": true,
99+
"timeToResolve": "PT10M"
100+
},
101+
"actions": [
102+
{
103+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
104+
"actionProperties": {
105+
"key11": "value11",
106+
"key12": "value12"
107+
}
108+
},
109+
{
110+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
111+
"actionProperties": {
112+
"key21": "value21",
113+
"key22": "value22"
114+
}
115+
}
116+
]
117+
}
118+
]
119+
}
120+
}
121+
},
122+
"201": {
123+
"headers": {},
124+
"body": {
125+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
126+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
127+
"location": "East US",
128+
"properties": {
129+
"description": "This is the description of the following rule group",
130+
"enabled": true,
131+
"interval": "PT10M",
132+
"clusterName": "myClusterName",
133+
"scopes": [
134+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
135+
],
136+
"rules": [
137+
{
138+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
139+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
140+
"labels": {
141+
"team": "prod"
142+
}
143+
},
144+
{
145+
"alert": "Billing_Processing_Very_Slow",
146+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
147+
"enabled": true,
148+
"severity": 2,
149+
"for": "PT5M",
150+
"labels": {
151+
"team": "prod"
152+
},
153+
"annotations": {
154+
"annotationName1": "annotationValue1"
155+
},
156+
"resolveConfiguration": {
157+
"autoResolved": true,
158+
"timeToResolve": "PT10M"
159+
},
160+
"actions": [
161+
{
162+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
163+
"actionProperties": {
164+
"key11": "value11",
165+
"key12": "value12"
166+
}
167+
},
168+
{
169+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
170+
"actionProperties": {
171+
"key21": "value21",
172+
"key22": "value22"
173+
}
174+
}
175+
]
176+
}
177+
]
178+
}
179+
}
180+
}
181+
}
182+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "promResourceGroup",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2023-03-01"
7+
},
8+
"responses": {
9+
"200": {},
10+
"204": {}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "promResourceGroup",
5+
"ruleGroupName": "myPrometheusRuleGroup",
6+
"api-version": "2023-03-01"
7+
},
8+
"responses": {
9+
"200": {
10+
"headers": {},
11+
"body": {
12+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
13+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
14+
"location": "East US",
15+
"properties": {
16+
"description": "This is the description of the following rule group",
17+
"enabled": true,
18+
"interval": "PT10M",
19+
"clusterName": "myClusterName",
20+
"scopes": [
21+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
22+
],
23+
"rules": [
24+
{
25+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
26+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
27+
"labels": {
28+
"team": "prod"
29+
}
30+
},
31+
{
32+
"alert": "Billing_Processing_Very_Slow",
33+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
34+
"enabled": true,
35+
"severity": 2,
36+
"for": "PT5M",
37+
"labels": {
38+
"team": "prod"
39+
},
40+
"annotations": {
41+
"annotationName1": "annotationValue1"
42+
},
43+
"resolveConfiguration": {
44+
"autoResolved": true,
45+
"timeToResolve": "PT10M"
46+
},
47+
"actions": [
48+
{
49+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
50+
"actionProperties": {
51+
"key11": "value11",
52+
"key12": "value12"
53+
}
54+
},
55+
{
56+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
57+
"actionProperties": {
58+
"key21": "value21",
59+
"key22": "value22"
60+
}
61+
}
62+
]
63+
}
64+
]
65+
}
66+
}
67+
}
68+
}
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
4+
"resourceGroupName": "promResourceGroup",
5+
"api-version": "2023-03-01"
6+
},
7+
"responses": {
8+
"200": {
9+
"headers": {},
10+
"body": {
11+
"value": [
12+
{
13+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroupName1",
14+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
15+
"location": "East US",
16+
"properties": {
17+
"description": "This is the description of the following rule group",
18+
"enabled": true,
19+
"interval": "PT10M",
20+
"clusterName": "myClusterName",
21+
"scopes": [
22+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
23+
],
24+
"rules": [
25+
{
26+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
27+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
28+
"labels": {
29+
"team": "prod"
30+
}
31+
},
32+
{
33+
"alert": "Billing_Processing_Very_Slow",
34+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
35+
"enabled": true,
36+
"severity": 2,
37+
"for": "PT5M",
38+
"labels": {
39+
"team": "prod"
40+
},
41+
"annotations": {
42+
"annotationName1": "annotationValue1"
43+
},
44+
"resolveConfiguration": {
45+
"autoResolved": true,
46+
"timeToResolve": "PT10M"
47+
},
48+
"actions": [
49+
{
50+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
51+
"actionProperties": {
52+
"key11": "value11",
53+
"key12": "value12"
54+
}
55+
},
56+
{
57+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
58+
"actionProperties": {
59+
"key21": "value21",
60+
"key22": "value22"
61+
}
62+
}
63+
]
64+
}
65+
]
66+
}
67+
},
68+
{
69+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/promResourceGroup/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroupName2",
70+
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
71+
"location": "East US",
72+
"properties": {
73+
"description": "This is the description of the following rule group",
74+
"enabled": true,
75+
"interval": "PT10M",
76+
"clusterName": "myClusterName",
77+
"scopes": [
78+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
79+
],
80+
"rules": [
81+
{
82+
"record": "job_type:billing_jobs_duration_seconds:99p5m",
83+
"expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))",
84+
"labels": {
85+
"team": "prod"
86+
}
87+
},
88+
{
89+
"alert": "Billing_Processing_Very_Slow",
90+
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
91+
"enabled": true,
92+
"severity": 2,
93+
"for": "PT5M",
94+
"labels": {
95+
"team": "prod"
96+
},
97+
"annotations": {
98+
"annotationName1": "annotationValue1"
99+
},
100+
"resolveConfiguration": {
101+
"autoResolved": true,
102+
"timeToResolve": "PT10M"
103+
},
104+
"actions": [
105+
{
106+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myactiongroup",
107+
"actionProperties": {
108+
"key11": "value11",
109+
"key12": "value12"
110+
}
111+
},
112+
{
113+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/myrg/providers/microsoft.insights/actiongroups/myotheractiongroup",
114+
"actionProperties": {
115+
"key21": "value21",
116+
"key22": "value22"
117+
}
118+
}
119+
]
120+
}
121+
]
122+
}
123+
}
124+
]
125+
}
126+
}
127+
}
128+
}

0 commit comments

Comments
 (0)