Skip to content

Commit ec4eca7

Browse files
avjerafiAvi Jerafi
andauthored
[Hub Generated] Review request for Microsoft.Insights to add version stable/2022-06-15 (#19652)
* Adds base for updating Microsoft.Insights from version stable/2021-08-01 to version 2022-06-15 * Updates readme * Updates API version in new specs and examples * Fixed package tag naming conflict * Separated SQR into package-2022-06-15-only * Fixed default package tag * Adding SQR 2022-06-15 version as part of package-2022-06 * Fixed default tag to be package-2022-06 * Added lenient-model-deduplication flag * Replaced common-types references to Resource,ErrorResponse with local definitions with different name * Renamed ErrorAdditionalInfo to ErrorResponseAdditionalInfo to avoid conflicts * Removed lenient-model-deduplication flag Co-authored-by: Avi Jerafi <[email protected]>
1 parent df34683 commit ec4eca7

10 files changed

+1812
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc",
4+
"resourceGroupName": "QueryResourceGroupName",
5+
"ruleName": "perf",
6+
"api-version": "2022-06-15",
7+
"parameters": {
8+
"location": "eastus",
9+
"properties": {
10+
"description": "Performance rule",
11+
"severity": 4,
12+
"enabled": true,
13+
"evaluationFrequency": "PT5M",
14+
"scopes": [
15+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
16+
],
17+
"windowSize": "PT10M",
18+
"criteria": {
19+
"allOf": [
20+
{
21+
"query": "Perf | where ObjectName == \"Processor\"",
22+
"timeAggregation": "Average",
23+
"metricMeasureColumn": "% Processor Time",
24+
"resourceIdColumn": "resourceId",
25+
"dimensions": [
26+
{
27+
"name": "ComputerIp",
28+
"operator": "Exclude",
29+
"values": [
30+
"192.168.1.1"
31+
]
32+
},
33+
{
34+
"name": "OSType",
35+
"operator": "Include",
36+
"values": [
37+
"*"
38+
]
39+
}
40+
],
41+
"operator": "GreaterThan",
42+
"threshold": 70,
43+
"failingPeriods": {
44+
"numberOfEvaluationPeriods": 1,
45+
"minFailingPeriodsToAlert": 1
46+
}
47+
}
48+
]
49+
},
50+
"muteActionsDuration": "PT30M",
51+
"actions": {
52+
"actionGroups": [
53+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
54+
],
55+
"customProperties": {
56+
"key11": "value11",
57+
"key12": "value12"
58+
}
59+
},
60+
"autoMitigate": true,
61+
"checkWorkspaceAlertsStorageConfigured": true,
62+
"skipQueryValidation": true
63+
}
64+
}
65+
},
66+
"responses": {
67+
"200": {
68+
"headers": {},
69+
"body": {
70+
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/perf",
71+
"name": "perf",
72+
"type": "microsoft.insights/scheduledqueryrules",
73+
"location": "eastus",
74+
"tags": {},
75+
"properties": {
76+
"description": "Performance rule",
77+
"severity": 4,
78+
"enabled": true,
79+
"evaluationFrequency": "PT5M",
80+
"scopes": [
81+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
82+
],
83+
"windowSize": "PT10M",
84+
"criteria": {
85+
"allOf": [
86+
{
87+
"query": "Perf | where ObjectName == \"Processor\"",
88+
"timeAggregation": "Average",
89+
"metricMeasureColumn": "% Processor Time",
90+
"resourceIdColumn": "resourceId",
91+
"dimensions": [
92+
{
93+
"name": "ComputerIp",
94+
"operator": "Exclude",
95+
"values": [
96+
"192.168.1.1"
97+
]
98+
},
99+
{
100+
"name": "OSType",
101+
"operator": "Include",
102+
"values": [
103+
"*"
104+
]
105+
}
106+
],
107+
"operator": "GreaterThan",
108+
"threshold": 70,
109+
"failingPeriods": {
110+
"numberOfEvaluationPeriods": 1,
111+
"minFailingPeriodsToAlert": 1
112+
}
113+
}
114+
]
115+
},
116+
"muteActionsDuration": "PT30M",
117+
"actions": {
118+
"actionGroups": [
119+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
120+
],
121+
"customProperties": {
122+
"key11": "value11",
123+
"key12": "value12"
124+
}
125+
},
126+
"autoMitigate": true,
127+
"isWorkspaceAlertsStorageConfigured": true,
128+
"checkWorkspaceAlertsStorageConfigured": true,
129+
"skipQueryValidation": true
130+
}
131+
}
132+
},
133+
"201": {
134+
"headers": {},
135+
"body": {
136+
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/perf",
137+
"name": "perf",
138+
"type": "microsoft.insights/scheduledqueryrules",
139+
"location": "eastus",
140+
"tags": {},
141+
"properties": {
142+
"description": "Performance rule",
143+
"severity": 4,
144+
"enabled": true,
145+
"evaluationFrequency": "PT5M",
146+
"scopes": [
147+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
148+
],
149+
"windowSize": "PT10M",
150+
"criteria": {
151+
"allOf": [
152+
{
153+
"query": "Perf | where ObjectName == \"Processor\"",
154+
"timeAggregation": "Average",
155+
"metricMeasureColumn": "% Processor Time",
156+
"resourceIdColumn": "resourceId",
157+
"dimensions": [
158+
{
159+
"name": "ComputerIp",
160+
"operator": "Exclude",
161+
"values": [
162+
"192.168.1.1"
163+
]
164+
},
165+
{
166+
"name": "OSType",
167+
"operator": "Include",
168+
"values": [
169+
"*"
170+
]
171+
}
172+
],
173+
"operator": "GreaterThan",
174+
"threshold": 70,
175+
"failingPeriods": {
176+
"numberOfEvaluationPeriods": 1,
177+
"minFailingPeriodsToAlert": 1
178+
}
179+
}
180+
]
181+
},
182+
"muteActionsDuration": "PT30M",
183+
"actions": {
184+
"actionGroups": [
185+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
186+
],
187+
"customProperties": {
188+
"key11": "value11",
189+
"key12": "value12"
190+
}
191+
},
192+
"autoMitigate": true,
193+
"isWorkspaceAlertsStorageConfigured": true,
194+
"checkWorkspaceAlertsStorageConfigured": true,
195+
"skipQueryValidation": true
196+
}
197+
}
198+
}
199+
}
200+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc",
4+
"resourceGroupName": "QueryResourceGroupName",
5+
"ruleName": "heartbeat",
6+
"api-version": "2022-06-15",
7+
"parameters": {
8+
"location": "eastus",
9+
"properties": {
10+
"description": "Health check rule",
11+
"severity": 4,
12+
"enabled": true,
13+
"evaluationFrequency": "PT5M",
14+
"scopes": [
15+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
16+
],
17+
"targetResourceTypes": [
18+
"Microsoft.Compute/virtualMachines"
19+
],
20+
"windowSize": "PT10M",
21+
"criteria": {
22+
"allOf": [
23+
{
24+
"query": "Heartbeat",
25+
"timeAggregation": "Count",
26+
"dimensions": [],
27+
"operator": "GreaterThan",
28+
"threshold": 360,
29+
"failingPeriods": {
30+
"numberOfEvaluationPeriods": 1,
31+
"minFailingPeriodsToAlert": 1
32+
}
33+
}
34+
]
35+
},
36+
"muteActionsDuration": "PT30M",
37+
"actions": {
38+
"actionGroups": [
39+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
40+
],
41+
"customProperties": {
42+
"key11": "value11",
43+
"key12": "value12"
44+
}
45+
},
46+
"autoMitigate": true,
47+
"checkWorkspaceAlertsStorageConfigured": true,
48+
"skipQueryValidation": true
49+
}
50+
}
51+
},
52+
"responses": {
53+
"200": {
54+
"headers": {},
55+
"body": {
56+
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/heartbeat",
57+
"name": "heartbeat",
58+
"type": "microsoft.insights/scheduledqueryrules",
59+
"location": "eastus",
60+
"tags": {},
61+
"properties": {
62+
"description": "Health check rule",
63+
"severity": 4,
64+
"enabled": true,
65+
"evaluationFrequency": "PT5M",
66+
"scopes": [
67+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
68+
],
69+
"targetResourceTypes": [
70+
"Microsoft.Compute/virtualMachines"
71+
],
72+
"windowSize": "PT10M",
73+
"criteria": {
74+
"allOf": [
75+
{
76+
"query": "Heartbeat",
77+
"timeAggregation": "Count",
78+
"dimensions": [],
79+
"operator": "GreaterThan",
80+
"threshold": 360,
81+
"failingPeriods": {
82+
"numberOfEvaluationPeriods": 1,
83+
"minFailingPeriodsToAlert": 1
84+
}
85+
}
86+
]
87+
},
88+
"muteActionsDuration": "PT30M",
89+
"actions": {
90+
"actionGroups": [
91+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
92+
],
93+
"customProperties": {
94+
"key11": "value11",
95+
"key12": "value12"
96+
}
97+
},
98+
"autoMitigate": true,
99+
"isWorkspaceAlertsStorageConfigured": true,
100+
"checkWorkspaceAlertsStorageConfigured": true,
101+
"skipQueryValidation": true
102+
}
103+
}
104+
},
105+
"201": {
106+
"headers": {},
107+
"body": {
108+
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/heartbeat",
109+
"name": "heartbeat",
110+
"type": "microsoft.insights/scheduledqueryrules",
111+
"location": "eastus",
112+
"tags": {},
113+
"properties": {
114+
"description": "Health check rule",
115+
"severity": 4,
116+
"enabled": true,
117+
"evaluationFrequency": "PT5M",
118+
"scopes": [
119+
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
120+
],
121+
"targetResourceTypes": [
122+
"Microsoft.Compute/virtualMachines"
123+
],
124+
"windowSize": "PT10M",
125+
"criteria": {
126+
"allOf": [
127+
{
128+
"query": "Heartbeat",
129+
"timeAggregation": "Count",
130+
"dimensions": [],
131+
"operator": "GreaterThan",
132+
"threshold": 360,
133+
"failingPeriods": {
134+
"numberOfEvaluationPeriods": 1,
135+
"minFailingPeriodsToAlert": 1
136+
}
137+
}
138+
]
139+
},
140+
"muteActionsDuration": "PT30M",
141+
"actions": {
142+
"actionGroups": [
143+
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"
144+
],
145+
"customProperties": {
146+
"key11": "value11",
147+
"key12": "value12"
148+
}
149+
},
150+
"autoMitigate": true,
151+
"isWorkspaceAlertsStorageConfigured": true,
152+
"checkWorkspaceAlertsStorageConfigured": true,
153+
"skipQueryValidation": true
154+
}
155+
}
156+
}
157+
}
158+
}

0 commit comments

Comments
 (0)