|
| 1 | +--- |
| 2 | +title: Deploy Log Analytics agent on Arc-enabled servers |
| 3 | +description: This article reviews the different methods to deploy the Log Analytics agent on Windows and Linux-based machines registered with Azure Arc-enabled servers in your local datacenter or other cloud environment. |
| 4 | +ms.date: 10/22/2021 |
| 5 | +ms.topic: conceptual |
| 6 | +--- |
| 7 | + |
| 8 | +# Understand deployment options for the Log Analytics agent on Azure Arc-enabled servers |
| 9 | + |
| 10 | +Azure Monitor supports multiple methods to install the Log Analytics agent and connect your machine or server registered with Azure Arc-enabled servers to the service. 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 like you can with Azure VMs. |
| 11 | + |
| 12 | +The Log Analytics agent is required if you want to: |
| 13 | + |
| 14 | +* Monitor the operating system, any workloads running on the machine or server using [VM insights](../../azure-monitor/vm/vminsights-overview.md). Further analyze and alert using other features of [Azure Monitor](../../azure-monitor/overview.md). |
| 15 | +* Perform security monitoring in Azure by using [Azure Security Center](../../security-center/security-center-introduction.md) or [Azure Sentinel](../../sentinel/overview.md). |
| 16 | +* Manage operating system updates by using [Azure Automation Update Management](../../automation/update-management/overview.md). |
| 17 | +* Collect inventory and track changes by using [Azure Automation Change Tracking and Inventory](../../automation/change-tracking/overview.md). |
| 18 | +* Run Automation runbooks directly on the machine and against resources in the environment by using an [Azure Automation Hybrid Runbook Worker](../../automation/automation-hybrid-runbook-worker.md). |
| 19 | + |
| 20 | +This article reviews the deployment methods for the Log Analytics agent VM extension, across multiple production physical servers or virtual machines in your environment, to help you determine which works best for your organization. If you are interested in the new Azure Monitor agent and want to see a detailed comparison, then review the [Azure Monitor agents overview](../../azure-monitor//agents/agents-overview.md) article. |
| 21 | + |
| 22 | +## Installation options |
| 23 | + |
| 24 | +You can use different methods to install the VM extension using one method or a combination. This section describes each one for you to consider. |
| 25 | + |
| 26 | +### Using Arc-enabled servers |
| 27 | + |
| 28 | +This method supports managing the installation, management, and removal of VM extensions from the [Azure portal](manage-vm-extensions-portal.md), using [PowerShell](manage-vm-extensions-powershell.md), the [Azure CLI](manage-vm-extensions-cli.md), or with an [Azure Resource Manager (ARM) template](manage-vm-extensions-template.md). |
| 29 | + |
| 30 | +#### Advantages |
| 31 | + |
| 32 | +* Can be useful for testing purposes. |
| 33 | +* Useful if you have a few machines to manage. |
| 34 | + |
| 35 | +#### Disadvantages |
| 36 | + |
| 37 | +* Limited automation when using an Azure Resource Manager template, otherwise it is time consuming. |
| 38 | +* Can only focus on a single Arc-enabled server, and not multiple instances. |
| 39 | +* Only supports specifying a single workspace to report to. Requires using PowerShell or the Azure CLI to configure the Log Analytics Windows agent VM extension to report to up to four workspaces. |
| 40 | +* Doesn't support deploying the Dependency agent from the portal. You can only use PowerShell, the Azure CLI, or ARM template. |
| 41 | + |
| 42 | +### Using Azure Policy |
| 43 | + |
| 44 | +You can use Azure Policy to deploy the Log Analytics agent VM extension at-scale to machines in your environment, and maintain configuration compliance. This is accomplished by using either the **Configure Log Analytics extension on Azure Arc enabled Linux servers** / **Configure Log Analytics extension on Azure Arc enabled Windows servers** policy definition, or the **Enable Azure Monitor for VMs** policy initiative. |
| 45 | + |
| 46 | +Azure Policy includes several prebuilt definitions related to Azure Monitor. For a complete list of the built-in policies in the **Monitoring** category, see [Azure Policy built-in definitions for Azure Monitor](../../azure-monitor/policy-reference.md). |
| 47 | + |
| 48 | +#### Advantages |
| 49 | + |
| 50 | +* If the VM extension is removed, after policy evaluation it reinstalls it. |
| 51 | +* Identifies and installs the VM extension when a new Azure Arc-enabled server is registered with Azure. |
| 52 | +* Only supports specifying a single workspace to report to. Requires using PowerShell or the Azure CLI to configure the Log Analytics Windows agent VM extension to report to up to four workspaces. |
| 53 | + |
| 54 | +#### Disadvantages |
| 55 | + |
| 56 | +* The **Configure Log Analytics extension on Azure Arc enabled** *operating system* **servers** policy only installs the Log Analytics VM extension and configures the agent to report to a specified Log Analytics workspace. If you are interested in VM insights to monitor the operating system performance, and map running processes and dependencies on other resources, then you should apply the policy initiative **Enable Azure Monitor for VMs**. It installs and configures both the Log Analytics VM extension and the Dependency agent VM extension, which are required. |
| 57 | +* 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](../../governance/policy/how-to/get-compliance-data.md#evaluation-triggers). |
| 58 | + |
| 59 | +### Using Azure Automation |
| 60 | + |
| 61 | +The process automation operating environment in Azure Automation and its support for PowerShell and Python runbooks can enable you to automate the deployment of the Log Analytics agent VM extension at-scale to machines in your environment. |
| 62 | + |
| 63 | +#### Advantages |
| 64 | + |
| 65 | +* Can use a scripted method to automate its deployment and configuration using scripting languages you're familiar with. |
| 66 | +* Runs on a schedule that you define and control. |
| 67 | +* Authenticate securely to Arc-enabled servers from the Automation account using a managed identity. |
| 68 | + |
| 69 | +#### Disadvantages |
| 70 | + |
| 71 | +* Requires an Azure Automation account. |
| 72 | +* Experience authoring and managing runbooks in Azure Automation. |
| 73 | +* Creating a runbook based on PowerShell or Python depending on the target operating system. |
| 74 | + |
| 75 | +## Next steps |
| 76 | + |
| 77 | +* To manage operating system updates using Azure Automation Update Management, review [Enable from an Automation account](../../automation/update-management/enable-from-automation-account.md) and then follow the steps to enable machines reporting to the workspace. |
| 78 | + |
| 79 | +* To track changes using Azure Automation Change Tracking and Inventory, review [Enable from an Automation account](../../automation/change-tracking/enable-from-automation-account.md) and then follow the steps to enable machines reporting to the workspace. |
| 80 | + |
| 81 | +* You can use the user Hybrid Runbook Worker feature of Azure Automation to run runbooks directly on servers or machines registered with Arc-enabled servers. See the [Deploy Hybrid Runbook Worker VM extension](../../automation/extension-based-hybrid-runbook-worker-install.md) article. |
| 82 | + |
| 83 | +* To start collecting security-related events with Azure Sentinel, see [onboard to Azure Sentinel](scenario-onboard-azure-sentinel.md), or to collect with Azure Security Center, see [onboard to Azure Security Center](../../security-center/quickstart-onboard-machines.md). |
| 84 | + |
| 85 | +* See the VM insights [Monitor performance](../../azure-monitor/vm/vminsights-performance.md) and [Map dependencies](../../azure-monitor/vm/vminsights-maps.md) articles to see how well your machine is performing and view discovered application components. |
0 commit comments