-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
VMSS_LogAnalyticsAgent_AINE.json
67 lines (67 loc) · 2.07 KB
/
VMSS_LogAnalyticsAgent_AINE.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
{
"properties": {
"displayName": "The Log Analytics extension should be installed on Virtual Machine Scale Sets",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy audits any Windows/Linux Virtual Machine Scale Sets if the Log Analytics extension is not installed.",
"metadata": {
"version": "1.0.1",
"category": "Monitoring"
},
"version": "1.0.1",
"parameters": {
"effect": {
"type": "string",
"defaultValue": "AuditIfNotExists",
"allowedValues": [
"AuditIfNotExists",
"Disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Compute/virtualMachineScaleSets"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Compute/virtualMachineScaleSets/extensions",
"existenceCondition": {
"allOf": [
{
"field": "Microsoft.Compute/virtualMachineScaleSets/extensions/publisher",
"equals": "Microsoft.EnterpriseCloud.Monitoring"
},
{
"field": "Microsoft.Compute/virtualMachineScaleSets/extensions/type",
"in": [
"MicrosoftMonitoringAgent",
"OmsAgentForLinux"
]
},
{
"field": "Microsoft.Compute/virtualMachineScaleSets/extensions/provisioningState",
"equals": "Succeeded"
},
{
"field": "Microsoft.Compute/virtualMachineScaleSets/extensions/settings.workspaceId",
"exists": "true"
}
]
}
}
}
},
"versions": [
"1.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/efbde977-ba53-4479-b8e9-10b957924fbf",
"name": "efbde977-ba53-4479-b8e9-10b957924fbf"
}