last sync: 2021-Sep-24 16:09:49 UTC

Azure Policy definition

The Log Analytics agent should be installed on virtual machines

Name The Log Analytics agent should be installed on virtual machines
Azure Portal
Id a70ca396-0a34-413a-88e1-b956c1e683be
Version 1.0.0
details on versioning
Category Monitoring
Microsoft docs
Description This policy audits any Windows/Linux virtual machines if the Log Analytics agent is not installed.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: AuditIfNotExists
Allowed: (AuditIfNotExists, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2019-10-11 00:02:54 add a70ca396-0a34-413a-88e1-b956c1e683be
Used in Initiatives
Initiative DisplayName Initiative Id Initiative Category State
[Deprecated]: Azure Security Benchmark v1 42a694ed-f65e-42b2-aa9e-8052e9740a92 Regulatory Compliance Deprecated
[Deprecated]: DoD Impact Level 4 8d792a84-723c-4d92-a3c3-e4ed16a2d133 Regulatory Compliance Deprecated
[Preview]: CMMC Level 3 b5629c75-5c77-4422-87b9-2509e680f8de Regulatory Compliance Preview
[Preview]: NIST SP 800-171 R2 03055927-78bd-4236-86c0-f36125a10dc9 Regulatory Compliance Preview
HITRUST/HIPAA a169a624-5599-4385-a696-c8d643089fab Regulatory Compliance GA
JSON
{
  "displayName": "The Log Analytics agent should be installed on virtual machines",
  "policyType": "BuiltIn",
  "mode": "Indexed",
  "description": "This policy audits any Windows/Linux virtual machines if the Log Analytics agent is not installed.",
  "metadata": {
    "version": "1.0.1",
    "category": "Monitoring"
  },
  "parameters": {
    "effect": {
      "type": "String",
      "metadata": {
        "displayName": "Effect",
        "description": "Enable or disable the execution of the policy"
      },
      "allowedValues": [
        "AuditIfNotExists",
        "Disabled"
      ],
      "defaultValue": "AuditIfNotExists"
    }
  },
  "policyRule": {
    "if": {
      "field": "type",
      "equals": "Microsoft.Compute/virtualMachines"
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "type": "Microsoft.Compute/virtualMachines/extensions",
        "existenceCondition": {
          "allOf": [
            {
              "field": "Microsoft.Compute/virtualMachines/extensions/publisher",
              "equals": "Microsoft.EnterpriseCloud.Monitoring"
            },
            {
              "field": "Microsoft.Compute/virtualMachines/extensions/type",
              "in": [
                "MicrosoftMonitoringAgent",
                "OmsAgentForLinux"
              ]
            },
            {
              "field": "Microsoft.Compute/virtualMachines/extensions/provisioningState",
              "equals": "Succeeded"
            },
            {
              "field": "Microsoft.Compute/virtualMachines/extensions/settings.workspaceId",
              "exists": "true"
            }
          ]
        }
      }
    }
  }
}