last sync: 2021-Jul-08 14:19:52 UTC

Azure Policy Initiative

Configure Azure Monitor Agent to Windows virtual machines and associate to Data Collection Rule

NameConfigure Azure Monitor Agent to Windows virtual machines and associate to Data Collection Rule
Azure Portal
Id9575b8b7-78ab-4281-b53b-d3c1ace2260b
Version1.0.0
details on versioning
CategoryMonitoring
Microsoft docs
DescriptionDeploy Azure Monitor Agent for Windows virtual machines if the virtual machine image (OS) and location are in the list defined and the agent is not installed. Then, deploy Association to link virtual machine to specified Data Collection Rule. The list of OS images is updated over time as support is increased.
TypeBuiltIn
DeprecatedFalse
PreviewFalse
History
Date/Time (UTC ymd) (i) Changes
2021-05-26 13:43:18 add Initiative 9575b8b7-78ab-4281-b53b-d3c1ace2260b
Policy count Total Policies: 2
Builtin Policies: 2
Static Policies: 0
Policy used
Policy DisplayName Policy Id Category Effect State
Configure Association to link Windows virtual machines to Data Collection Rule eab1f514-22e3-42e3-9a1f-e1dc9199355c Monitoring Default: DeployIfNotExists
Allowed: (DeployIfNotExists, Disabled)
GA
Configure Windows virtual machines with Azure Monitor Agent ca817e41-e85a-4783-bc7f-dc532d36235e Monitoring Default: DeployIfNotExists
Allowed: (DeployIfNotExists, Disabled)
GA
JSON
{
  "properties": {
    "displayName": "Configure Azure Monitor Agent to Windows virtual machines and associate to Data Collection Rule",
    "policyType": "BuiltIn",
    "description": "Deploy Azure Monitor Agent for Windows virtual machines if the virtual machine image (OS) and location are in the list defined and the agent is not installed.  Then, deploy Association to link virtual machine to specified Data Collection Rule. The list of OS images is updated over time as support is increased.",
    "metadata": {
      "version": "1.0.0",
      "category": "Monitoring"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy."
        },
        "allowedValues": [
          "DeployIfNotExists",
          "Disabled"
        ],
        "defaultValue": "DeployIfNotExists"
      },
      "listOfWindowsImageIdToInclude": {
        "type": "Array",
        "metadata": {
          "displayName": "Optional: List of virtual machine images that have supported Windows OS to add to scope",
          "description": "Example value: '/subscriptions//resourceGroups/YourResourceGroup/providers/Microsoft.Compute/images/ContosoStdImage'"
        },
        "defaultValue": [
          
        ]
      },
      "DcrResourceId": {
        "type": "String",
        "metadata": {
          "displayName": "Data Collection Rule Resource Id",
          "description": "Resource Id of the Data Collection Rule that the virtual machines in scope should point to."
        }
      }
    },
    "policyDefinitions": [
      {
        "policyDefinitionReferenceId": "deployAzureMonitoringAgentWindows",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/ca817e41-e85a-4783-bc7f-dc532d36235e",
        "parameters": {
          "effect": {
          "value": "[parameters('effect')]"
          },
          "listOfWindowsImageIdToInclude": {
          "value": "[parameters('listOfWindowsImageIdToInclude')]"
          }
        }
      },
      {
        "policyDefinitionReferenceId": "associateDataCollectionRuleWindows",
        "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/eab1f514-22e3-42e3-9a1f-e1dc9199355c",
        "parameters": {
          "effect": {
          "value": "[parameters('effect')]"
          },
          "listOfWindowsImageIdToInclude": {
          "value": "[parameters('listOfWindowsImageIdToInclude')]"
          },
          "DcrResourceId": {
          "value": "[parameters('DcrResourceId')]"
          }
        }
      }
    ]
  },
  "id": "/providers/Microsoft.Authorization/policySetDefinitions/9575b8b7-78ab-4281-b53b-d3c1ace2260b",
  "type": "Microsoft.Authorization/policySetDefinitions",
  "name": "9575b8b7-78ab-4281-b53b-d3c1ace2260b"
}