last sync: 2020-Sep-22 14:52:17 UTC

Azure Policy Initiative

Enable Azure Monitor for VMs

Initiative DisplayName Enable Azure Monitor for VMs
Initiative Id 55f3eceb-5573-4f18-9695-226972c6d74a
Initiative Category Monitoring
Initiative Description Enable Azure Monitor for the virtual machines (VMs) in the specified scope (management group, subscription or resource group). Takes Log Analytics workspace as parameter.
Initiative Type BuiltIn
Initiative Changes
Date/Time (UTC ymd) (i) Change(s)
2020-05-29 15:39:26 add Policy [Preview]: Deploy Log Analytics agent to Linux Azure Arc machines (9d2b61b4-1d14-4a63-be30-d4498e7ad2cf)
add Policy [Preview]: Deploy Dependency agent to hybrid Linux Azure Arc machines (deacecc0-9f84-44d2-bb82-46f32d766d43)
2020-05-21 16:06:36 add Policy [Preview]: Deploy Log Analytics agent to Windows Azure Arc machines (69af7d4a-7b18-4044-93a9-2651498ef203)
2020-05-14 05:31:20 add Policy [Preview]: Deploy Dependency agent to Windows Azure Arc machines (91cb9edd-cd92-4d2f-b2f2-bdd8d065a3d4)
2020-04-22 04:43:14 change DisplayName Name change: '[Preview]: Enable Azure Monitor for VMs' to 'Enable Azure Monitor for VMs'
Initiative Policies count Total Policies: 10
Builtin Policies: 10/10
Static Policies: 0/10
Initiative Policies
Policy DisplayName Policy Id
Audit Dependency agent deployment - VM Image (OS) unlisted 11ac78e3-31bc-4f0c-8434-37ab963cea07
[Preview]: Audit Log Analytics Agent Deployment - VM Image (OS) unlisted 32133ab0-ee4b-4b44-98d6-042180979d50
[Preview]: Deploy Log Analytics agent to Linux Azure Arc machines 9d2b61b4-1d14-4a63-be30-d4498e7ad2cf
[Preview]: Deploy Log Analytics agent to Windows Azure Arc machines 69af7d4a-7b18-4044-93a9-2651498ef203
[Preview]: Deploy Dependency agent to Windows Azure Arc machines 91cb9edd-cd92-4d2f-b2f2-bdd8d065a3d4
[Preview]: Deploy Dependency agent to hybrid Linux Azure Arc machines deacecc0-9f84-44d2-bb82-46f32d766d43
Deploy Log Analytics agent for Windows VMs 0868462e-646c-4fe3-9ced-a733534b6a2c
Deploy Log Analytics agent for Linux VMs 053d3325-282c-4e5c-b944-24faffd30d77
Deploy Dependency agent for Linux virtual machines 4da21710-ce6f-4e06-8cdb-5cc4c93ffbee
Deploy Dependency agent for Windows virtual machines 1c210e94-a481-4beb-95fa-1571b434fb04
Initiative Rule
{
  "properties": {
    "displayName": "Enable Azure Monitor for VMs",
    "policyType": "BuiltIn",
    "description": "Enable Azure Monitor for the virtual machines (VMs) in the specified scope (management group, subscription or resource group). Takes Log Analytics workspace as parameter.",
    "metadata": {
      "version": "2.0.0",
      "category": "Monitoring"
    },
    "parameters": {
      "logAnalytics_1": {
        "type": "String",
        "metadata": {
          "displayName": "Log Analytics workspace",
          "description": "Select Log Analytics workspace from dropdown list. If this workspace is outside of the scope of the assignment you must manually grant 'Log Analytics Contributor' permissions (or similar) to the policy assignment's principal ID.",
          "strongType": "omsWorkspace"
        }
      },
      "listOfImageIdToInclude_windows": {
        "type": "Array",
        "metadata": {
          "displayName": "Optional: List of VM images that have supported Windows OS to add to scope",
          "description": "Example value: '/subscriptions//resourceGroups/YourResourceGroup/providers/Microsoft.Compute/images/ContosoStdImage'"
        },
        "defaultValue": [
          
        ]
      },
      "listOfImageIdToInclude_linux": {
        "type": "Array",
        "metadata": {
          "displayName": "Optional: List of VM images that have supported Linux OS to add to scope",
          "description": "Example value: '/subscriptions//resourceGroups/YourResourceGroup/providers/Microsoft.Compute/images/ContosoStdImage'"
        },
        "defaultValue": [
          
        ]
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "LogAnalyticsExtension_Windows_HybridVM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/69af7d4a-7b18-4044-93a9-2651498ef203",
        "parameters": {
          "logAnalytics": {
          "value": "[parameters('logAnalytics_1')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "LogAnalyticsExtension_Windows_VM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/0868462e-646c-4fe3-9ced-a733534b6a2c",
        "parameters": {
          "logAnalytics": {
          "value": "[parameters('logAnalytics_1')]"
          },
          "listOfImageIdToInclude": {
          "value": "[parameters('listOfImageIdToInclude_windows')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "LogAnalyticsExtension_Linux_HybridVM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/9d2b61b4-1d14-4a63-be30-d4498e7ad2cf",
        "parameters": {
          "logAnalytics": {
          "value": "[parameters('logAnalytics_1')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "LogAnalyticsExtension_Linux_VM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/053d3325-282c-4e5c-b944-24faffd30d77",
        "parameters": {
          "logAnalytics": {
          "value": "[parameters('logAnalytics_1')]"
          },
          "listOfImageIdToInclude": {
          "value": "[parameters('listOfImageIdToInclude_linux')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "DependencyAgentExtension_Windows_HybridVM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/91cb9edd-cd92-4d2f-b2f2-bdd8d065a3d4"
      },
      {
        "policyDefinitionReferenceId": "DependencyAgentExtension_Windows_VM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/1c210e94-a481-4beb-95fa-1571b434fb04",
        "parameters": {
          "listOfImageIdToInclude": {
          "value": "[parameters('listOfImageIdToInclude_windows')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "DependencyAgentExtension_Linux_HybridVM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/deacecc0-9f84-44d2-bb82-46f32d766d43"
      },
      {
        "policyDefinitionReferenceId": "DependencyAgentExtension_Linux_VM_Deploy",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/4da21710-ce6f-4e06-8cdb-5cc4c93ffbee",
        "parameters": {
          "listOfImageIdToInclude": {
          "value": "[parameters('listOfImageIdToInclude_linux')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "LogAnalytics_OSImage_Audit",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/32133ab0-ee4b-4b44-98d6-042180979d50",
        "parameters": {
          "listOfImageIdToInclude_windows": {
          "value": "[parameters('listOfImageIdToInclude_windows')]"
          },
          "listOfImageIdToInclude_linux": {
          "value": "[parameters('listOfImageIdToInclude_linux')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "DependencyAgent_OSImage_Audit",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/11ac78e3-31bc-4f0c-8434-37ab963cea07",
        "parameters": {
          "listOfImageIdToInclude_windows": {
          "value": "[parameters('listOfImageIdToInclude_windows')]"
          },
          "listOfImageIdToInclude_linux": {
          "value": "[parameters('listOfImageIdToInclude_linux')]"
          }
        }
      }
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/55f3eceb-5573-4f18-9695-226972c6d74a",
  "type": "Microsoft.Authorization/policySetDefinitions",
  "name": "55f3eceb-5573-4f18-9695-226972c6d74a"
}