-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete-app-service-alert.json
67 lines (67 loc) · 2.29 KB
/
delete-app-service-alert.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
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"alertRuleName": {
"defaultValue": "Resource Group - Delete app service",
"type": "String"
},
"alertRuleDescription": {
"defaultValue": "Trigger alert whenever an app service is deleted from the resource group.",
"type": "String"
},
"resourceGroupResourceId": {
"type": "String",
"metadata": {
"desscription": "The resource group of which the alert will attach to monitor for delete app service event."
}
}
},
"variables": {},
"resources": [
{
"type": "microsoft.insights/activityLogAlerts",
"apiVersion": "2020-10-01",
"name": "[parameters('alertRuleName')]",
"location": "Global",
"properties": {
"scopes": [
"[parameters('resourceGroupResourceId')]"
],
"condition": {
"allOf": [
{
"field": "category",
"equals": "Administrative"
},
{
"field": "resourceType",
"equals": "microsoft.web/sites"
},
{
"field": "operationName",
"equals": "Microsoft.Web/sites/Delete"
},
{
"field": "level",
"containsAny": [
"informational"
]
},
{
"field": "status",
"containsAny": [
"succeeded"
]
}
]
},
"actions": {
"actionGroups": []
},
"enabled": true,
"description": "[parameters('alertRuleDescription')]"
}
}
]
}