Gallery › Security Center › Azure built-in policies
[Deprecated]: Log Analytics agent health issues should be resolved on your machines
Converted Policy AuditIfNotExists Disabled Mode All Version 1.0.0-deprecated Deprecated
Security Center uses the Log Analytics agent, formerly known as the Microsoft Monitoring Agent (MMA). To make sure your virtual machines are successfully monitored, you need to make sure the agent is installed on the virtual machines and properly collects security events to the configured workspace.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONASC_ResolveLaHealthIssues.json · 56 lines
{
"properties": {
"displayName": "[Deprecated]: Log Analytics agent health issues should be resolved on your machines",
"policyType": "BuiltIn",
"mode": "All",
"description": "Security Center uses the Log Analytics agent, formerly known as the Microsoft Monitoring Agent (MMA). To make sure your virtual machines are successfully monitored, you need to make sure the agent is installed on the virtual machines and properly collects security events to the configured workspace.",
"metadata": {
"version": "1.0.0-deprecated",
"category": "Security Center",
"deprecated": true
},
"version": "1.0.0",
"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",
"in": [
"Microsoft.ClassicCompute/virtualMachines",
"Microsoft.Compute/virtualMachines"
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"type": "Microsoft.Security/assessments",
"name": "8e2b96ff-3de2-289b-b5c1-3b9921a3441e",
"existenceCondition": {
"field": "Microsoft.Security/assessments/status.code",
"in": [
"NotApplicable",
"Healthy"
]
}
}
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/d62cfe2b-3ab0-4d41-980d-76803b58ca65",
"name": "d62cfe2b-3ab0-4d41-980d-76803b58ca65"
}Bylawd62cfe2b-3ab0-4d41-980d-76803b58ca65.bylaw.ps1 · 34 lines
# Converted from ASC_ResolveLaHealthIssues.json by ConvertTo-Bylaw.
Policy 'd62cfe2b-3ab0-4d41-980d-76803b58ca65' {
Properties @{
DisplayName = '[Deprecated]: Log Analytics agent health issues should be resolved on your machines'
Description = 'Security Center uses the Log Analytics agent, formerly known as the Microsoft Monitoring Agent (MMA). To make sure your virtual machines are successfully monitored, you need to make sure the agent is installed on the virtual machines and properly collects security events to the configured workspace.'
Version = '1.0.0-deprecated'
Category = 'Security Center'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'All'
}
Parameter Effect @{
Type = 'string'
AllowedValues = @('AuditIfNotExists', 'Disabled')
Default = 'AuditIfNotExists'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource * {
Require 'type is not one of 2 values' {
Field type | Must -Not -BeIn @('Microsoft.ClassicCompute/virtualMachines', 'Microsoft.Compute/virtualMachines') -IfPresent
}
}
AuditIfNotExists 'Microsoft.Security/assessments' -Name '8e2b96ff-3de2-289b-b5c1-3b9921a3441e' -Effect (Param Effect) {
Require 'status.code is one of 2 values' {
Field status.code | Must -BeIn @('NotApplicable', 'Healthy')
}
}
}Source: built-in-policies/policyDefinitions/Security Center/ASC_ResolveLaHealthIssues.json in Azure/azure-policy, under the MIT licence.
Bylaw