This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathALZ-MonitorServiceHealth.json
265 lines (265 loc) · 10.6 KB
/
ALZ-MonitorServiceHealth.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"parTelemetryOptOut": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Set Parameter to true to Opt-out of deployment telemetry"
}
}
},
"variables": {
"varCuaid": "7e6d4601-dfd7-4996-8ea6-3e1ef93758f1"
},
"resources": [
{
"type": "Microsoft.Authorization/policySetDefinitions",
"apiVersion": "2021-06-01",
"name": "Alerting-ServiceHealth",
"properties": {
"displayName": "Deploy Service Health alerts",
"description": "This policy set deploys Service Health alerts for Azure services. Aslo a basic action and alert processing rule is deployed",
"metadata": {
"version": "1.1.0",
"category": "Monitoring",
"source": "https://github.com/Azure/Enterprise-Scale/",
"alzCloudEnvironments": [
"AzureCloud"
],
"_deployed_by_alz_monitor": true
},
"parameters": {
"ALZMonitorResourceGroupName": {
"type": "String",
"defaultValue": "ALZ-Monitoring-RG",
"metadata": {
"displayName": "Resource Group Name",
"description": "Name of the resource group to deploy the alerts to"
}
},
"ALZMonitorResourceGroupTags": {
"type": "Object",
"defaultValue": {
"_deployed_by_alz_monitor": true
},
"metadata": {
"displayName": "Resource Group Tags",
"description": "Tags to apply to the resource group"
}
},
"ALZMonitorResourceGroupLocation": {
"type": "String",
"defaultValue": "centralus",
"metadata": {
"displayName": "Resource Group Location",
"description": "Location of the resource group"
}
},
"ResHlthUnhealthyAlertState": {
"type": "string",
"defaultValue": "true",
"metadata": {
"displayName": "Resource Health Unhealthy Alert State",
"description": "State of the Resource Health Unhealthy alert"
}
},
"SvcHlthAdvisoryAlertState": {
"type": "string",
"defaultValue": "true",
"metadata": {
"displayName": "Service Health Advisory Alert State",
"description": "State of the Service Health Advisory alert"
}
},
"SvcHlthIncidentAlertState": {
"type": "string",
"defaultValue": "true",
"metadata": {
"displayName": "Service Health Incident Alert State",
"description": "State of the Service Health Incident alert"
}
},
"SvcHlthMaintenanceAlertState": {
"type": "string",
"defaultValue": "true",
"metadata": {
"displayName": "Service Health Maintenance Alert State",
"description": "State of the Service Health Maintenance alert"
}
},
"svcHlthSecAdvisoryAlertState": {
"type": "string",
"defaultValue": "true",
"metadata": {
"displayName": "Service Health Security Advisory Alert State",
"description": "State of the Service Health Security Advisory alert"
}
},
"ALZMonitorActionGroupEmail": {
"type": "string",
"defaultValue": "[email protected]",
"metadata": {
"displayName": "Action Group Email",
"description": "Email address to send alerts to"
}
},
"MonitorDisable": {
"type": "string",
"defaultValue": "MonitorDisable",
"metadata": {
"displayName": "Monitor Disable",
"description": "Disable the Monitor"
}
}
},
"policyDefinitions": [
{
"policyDefinitionReferenceId": "ALZ_ResHlthUnhealthy",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_activitylog_ResourceHealth_Unhealthy_Alert')]",
"parameters": {
"enabled": {
"value": "[[parameters('ResHlthUnhealthyAlertState')]"
},
"alertResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"alertResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"alertResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
}
}
},
{
"policyDefinitionReferenceId": "ALZ_SvcHlthAdvisory",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_activitylog_ServiceHealth_HealthAdvisory')]",
"parameters": {
"enabled": {
"value": "[[parameters('SvcHlthAdvisoryAlertState')]"
},
"alertResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"alertResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"alertResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
},
"ALZMonitorActionGroupEmail": {
"value": "[[parameters('ALZMonitorActionGroupEmail')]"
}
}
},
{
"policyDefinitionReferenceId": "ALZ_SvcHlthIncident",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_activitylog_ServiceHealth_Incident')]",
"parameters": {
"enabled": {
"value": "[[parameters('SvcHlthIncidentAlertState')]"
},
"alertResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"alertResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"alertResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
},
"ALZMonitorActionGroupEmail": {
"value": "[[parameters('ALZMonitorActionGroupEmail')]"
}
}
},
{
"policyDefinitionReferenceId": "ALZ_SvcHlthMaintenance",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_activitylog_ServiceHealth_Maintenance')]",
"parameters": {
"enabled": {
"value": "[[parameters('SvcHlthMaintenanceAlertState')]"
},
"alertResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"alertResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"alertResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
},
"ALZMonitorActionGroupEmail": {
"value": "[[parameters('ALZMonitorActionGroupEmail')]"
}
}
},
{
"policyDefinitionReferenceId": "ALZ_svcHlthSecAdvisory",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_activitylog_ServiceHealth_SecurityAdvisory')]",
"parameters": {
"enabled": {
"value": "[[parameters('svcHlthSecAdvisoryAlertState')]"
},
"alertResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"alertResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"alertResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
},
"ALZMonitorActionGroupEmail": {
"value": "[[parameters('ALZMonitorActionGroupEmail')]"
}
}
},
{
"policyDefinitionReferenceId": "ALZ_AlertProcessing_Rule",
"policyDefinitionId": "[concat('/providers/Microsoft.Management/managementGroups/',managementGroup().name, '/providers/Microsoft.Authorization/policyDefinitions/Deploy_AlertProcessing_Rule')]",
"parameters": {
"ALZMonitorResourceGroupName": {
"value": "[[parameters('ALZMonitorResourceGroupName')]"
},
"ALZMonitorResourceGroupTags": {
"value": "[[parameters('ALZMonitorResourceGroupTags')]"
},
"ALZMonitorResourceGroupLocation": {
"value": "[[parameters('ALZMonitorResourceGroupLocation')]"
},
"ALZMonitorActionGroupEmail": {
"value": "[[parameters('ALZMonitorActionGroupEmail')]"
},
"MonitorDisable": {
"value": "[[parameters('MonitorDisable')]"
}
}
}
],
"policyType": "Custom"
}
},
{
"condition": "[not(parameters('parTelemetryOptOut'))]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2020-10-01",
"name": "[format('pid-{0}-{1}', variables('varCuaid'), uniqueString(deployment().location))]",
"location": "[deployment().location]",
"properties": {
"expressionEvaluationOptions": {
"scope": "inner"
},
"mode": "Incremental",
"parameters": {},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
}
}
]
}