Edit

Share via


Deployment options for Azure Monitor agent on Azure Arc-enabled servers

Azure Monitor supports multiple methods to install the Azure Monitor agent as an extension on Azure Arc-enabled servers. Azure Arc-enabled servers support the Azure VM extension framework, which provides post-deployment configuration and automation tasks, enabling you to simplify management of your hybrid machines just as you can with Azure VMs.

The Azure Monitor Agent is required if you want to:

Note

Azure Monitor agent logs are stored locally and are updated after temporary disconnection of an Arc-enabled machine.

This article reviews recommended deployment methods for the Azure Monitor agent VM extension, across multiple production physical servers or virtual machines in your environment, to help you determine which works best for your organization.

Tip

For more information about the Azure Monitor agent, see Install and manage the Azure Monitor Agent.

Deploy the extension individually on each machine

This method supports managing the installation, management, and removal of VM extensions (including the Azure Monitor agent) from the Azure portal, using PowerShell, the Azure CLI, or with an Azure Resource Manager (ARM) template. You can enable automatic extension upgrade, which automatically updates the extension to the latest version when available.

Advantages of deploying the extension individually include:

  • Can be useful for testing purposes
  • Useful if you have a few machines to manage, or for testing with a small set of servers
  • Immediate deployment of extension

Disadvantages of deploying the extension individually include:

  • Limited automation
  • Not scalable to many servers
  • Doesn't create a Data Collection Rule (DCR); you must create a DCR separately and associate it with the agent before data collection begins.

Use Azure Policy

You can use Azure Policy to deploy the Azure Monitor agent VM extension at-scale to machines in your environment, and maintain configuration compliance. For detailed steps, see Deploy and configure Azure Monitor Agent using Azure Policy.

Advantages of using Azure Policy include:

  • Reinstalls the extension if removed (after policy evaluation)
  • Identifies and installs the extension when a new Azure Arc-enabled server is registered with Azure

Disadvantages of using Azure Policy include:

  • The Configure operating system Arc-enabled machines to run Azure Monitor Agent policy only installs the Azure Monitor agent extension and configures the agent to report to a specified Log Analytics workspace.
  • Standard compliance evaluation cycle is once every 24 hours. An evaluation scan for a subscription or a resource group can be started with Azure CLI, Azure PowerShell, a call to the REST API, or by using the Azure Policy Compliance Scan GitHub Action. For more information, see Evaluation triggers.

Use Azure Automation

The process automation operating environment in Azure Automation and its support for PowerShell and Python runbooks can help automate the deployment of the Azure Monitor agent VM extension at scale to machines in your environment.

Advantages of using Azure Automation include:

  • Can use a scripted method to automate deployment and configuration using scripting languages you're familiar with
  • Runs on a schedule that you define and control
  • Authenticate securely to Arc-enabled servers from the Automation account using a managed identity

Disadvantages of using Azure Automation include:

  • Requires an Azure Automation account
  • Requires authoring and managing runbooks in Azure Automation
  • Must create a runbook based on PowerShell or Python, depending on the target operating system

Next steps