{
  "properties": {
    "displayName": "Log Analytics agent should be installed on your virtual machine scale sets for Azure Security Center monitoring",
    "policyType": "BuiltIn",
    "mode": "All",
    "description": "Security Center collects data from your Azure virtual machines (VMs) to monitor for security vulnerabilities and threats.",
    "metadata": {
      "version": "1.0.0",
      "category": "Security Center"
    },
    "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.Compute/virtualMachineScaleSets"
        ]
      },
      "then": {
        "effect": "[parameters('effect')]",
        "details": {
          "type": "Microsoft.Security/assessments",
          "name": "45cfe080-ceb1-a91e-9743-71551ed24e94",
          "existenceCondition": {
            "field": "Microsoft.Security/assessments/status.code",
            "in": [
              "NotApplicable",
              "Healthy"
            ]
          }
        }
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/a3a6ea0c-e018-4933-9ef0-5aaa1501449b",
  "name": "a3a6ea0c-e018-4933-9ef0-5aaa1501449b"
}