Skip to content

Commit 8443d58

Browse files
authored
Metric Alerts Query GA version 2026-01-01 (Copy of API version 2024-03-01-preview) (#44262)
* Metric Alerts Query GA varsion 2026-01-01 * fix errors * Remove deprecated tag from MonitorClient configuration
1 parent b03cc8a commit 8443d58

55 files changed

Lines changed: 7120 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"parameters": {
3+
"api-version": "2026-01-01",
4+
"parameters": {
5+
"properties": {
6+
"description": "This is the description of the rule1",
7+
"actions": [
8+
{
9+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
10+
"webHookProperties": {
11+
"key11": "value11",
12+
"key12": "value12"
13+
}
14+
}
15+
],
16+
"autoMitigate": true,
17+
"criteria": {
18+
"allOf": [
19+
{
20+
"name": "High_CPU_80",
21+
"criterionType": "StaticThresholdCriterion",
22+
"dimensions": [],
23+
"metricName": "\\Processor(_Total)\\% Processor Time",
24+
"operator": "GreaterThan",
25+
"threshold": 80.5,
26+
"timeAggregation": "Average"
27+
}
28+
],
29+
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
30+
},
31+
"enabled": true,
32+
"evaluationFrequency": "PT1M",
33+
"scopes": [
34+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
35+
],
36+
"severity": 3,
37+
"windowSize": "PT15M"
38+
},
39+
"tags": {}
40+
},
41+
"resourceGroupName": "gigtest",
42+
"ruleName": "chiricutin",
43+
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"
44+
},
45+
"responses": {
46+
"200": {
47+
"body": {
48+
"type": "Microsoft.Insights/metricAlerts",
49+
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin",
50+
"location": "global",
51+
"properties": {
52+
"description": "This is the description of the rule1",
53+
"actions": [
54+
{
55+
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
56+
"webHookProperties": {
57+
"key11": "value11",
58+
"key12": "value12"
59+
}
60+
}
61+
],
62+
"autoMitigate": true,
63+
"criteria": {
64+
"allOf": [
65+
{
66+
"name": "High_CPU_80",
67+
"criterionType": "StaticThresholdCriterion",
68+
"dimensions": [],
69+
"metricName": "\\Processor(_Total)\\% Processor Time",
70+
"operator": "GreaterThan",
71+
"threshold": 80.5,
72+
"timeAggregation": "Average"
73+
}
74+
],
75+
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
76+
},
77+
"enabled": true,
78+
"evaluationFrequency": "PT1M",
79+
"scopes": [
80+
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
81+
],
82+
"severity": 3,
83+
"windowSize": "PT15M"
84+
},
85+
"tags": {
86+
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
87+
}
88+
},
89+
"headers": {}
90+
}
91+
},
92+
"operationId": "MetricAlerts_Update",
93+
"title": "Create or update an alert rule"
94+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
{
2+
"parameters": {
3+
"api-version": "2026-01-01",
4+
"parameters": {
5+
"location": "global",
6+
"properties": {
7+
"description": "This is the description of the rule1",
8+
"actions": [
9+
{
10+
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
11+
"webHookProperties": {
12+
"key11": "value11",
13+
"key12": "value12"
14+
}
15+
}
16+
],
17+
"autoMitigate": true,
18+
"criteria": {
19+
"allOf": [
20+
{
21+
"name": "High_CPU_80",
22+
"alertSensitivity": "Medium",
23+
"criterionType": "DynamicThresholdCriterion",
24+
"dimensions": [],
25+
"failingPeriods": {
26+
"minFailingPeriodsToAlert": 4,
27+
"numberOfEvaluationPeriods": 4
28+
},
29+
"metricName": "Percentage CPU",
30+
"metricNamespace": "microsoft.compute/virtualmachines",
31+
"operator": "GreaterOrLessThan",
32+
"timeAggregation": "Average"
33+
}
34+
],
35+
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
36+
},
37+
"enabled": true,
38+
"evaluationFrequency": "PT1M",
39+
"scopes": [
40+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
41+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
42+
],
43+
"severity": 3,
44+
"targetResourceRegion": "southcentralus",
45+
"targetResourceType": "Microsoft.Compute/virtualMachines",
46+
"windowSize": "PT15M"
47+
},
48+
"tags": {}
49+
},
50+
"resourceGroupName": "gigtest",
51+
"ruleName": "MetricAlertOnMultipleResources",
52+
"subscriptionId": "00000000-0000-0000-0000-000000000000"
53+
},
54+
"responses": {
55+
"200": {
56+
"body": {
57+
"type": "Microsoft.Insights/metricAlerts",
58+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources",
59+
"location": "global",
60+
"properties": {
61+
"description": "This is the description of the rule1",
62+
"actions": [
63+
{
64+
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
65+
"webHookProperties": {
66+
"key11": "value11",
67+
"key12": "value12"
68+
}
69+
}
70+
],
71+
"autoMitigate": true,
72+
"criteria": {
73+
"allOf": [
74+
{
75+
"name": "High_CPU_80",
76+
"alertSensitivity": "Medium",
77+
"criterionType": "DynamicThresholdCriterion",
78+
"dimensions": [],
79+
"failingPeriods": {
80+
"minFailingPeriodsToAlert": 4,
81+
"numberOfEvaluationPeriods": 4
82+
},
83+
"metricName": "Percentage CPU",
84+
"metricNamespace": "microsoft.compute/virtualmachines",
85+
"operator": "GreaterOrLessThan",
86+
"timeAggregation": "Average"
87+
}
88+
],
89+
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
90+
},
91+
"enabled": true,
92+
"evaluationFrequency": "PT1M",
93+
"scopes": [
94+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
95+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
96+
],
97+
"severity": 3,
98+
"targetResourceRegion": "southcentralus",
99+
"targetResourceType": "Microsoft.Compute/virtualMachines",
100+
"windowSize": "PT15M"
101+
},
102+
"tags": {
103+
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
104+
}
105+
},
106+
"headers": {}
107+
},
108+
"201": {
109+
"body": {
110+
"type": "Microsoft.Insights/metricAlerts",
111+
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources",
112+
"location": "global",
113+
"properties": {
114+
"description": "This is the description of the rule1",
115+
"actions": [
116+
{
117+
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
118+
"webHookProperties": {
119+
"key11": "value11",
120+
"key12": "value12"
121+
}
122+
}
123+
],
124+
"autoMitigate": true,
125+
"criteria": {
126+
"allOf": [
127+
{
128+
"name": "High_CPU_80",
129+
"alertSensitivity": "Medium",
130+
"criterionType": "DynamicThresholdCriterion",
131+
"dimensions": [],
132+
"failingPeriods": {
133+
"minFailingPeriodsToAlert": 4,
134+
"numberOfEvaluationPeriods": 4
135+
},
136+
"metricName": "Percentage CPU",
137+
"metricNamespace": "microsoft.compute/virtualmachines",
138+
"operator": "GreaterOrLessThan",
139+
"timeAggregation": "Average"
140+
}
141+
],
142+
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
143+
},
144+
"enabled": true,
145+
"evaluationFrequency": "PT1M",
146+
"scopes": [
147+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
148+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
149+
],
150+
"severity": 3,
151+
"targetResourceRegion": "southcentralus",
152+
"targetResourceType": "Microsoft.Compute/virtualMachines",
153+
"windowSize": "PT15M"
154+
},
155+
"tags": {
156+
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
157+
}
158+
},
159+
"headers": {}
160+
}
161+
},
162+
"operationId": "MetricAlerts_CreateOrUpdate",
163+
"title": "Create or update a dynamic alert rule for Multiple Resources"
164+
}

0 commit comments

Comments
 (0)