|
| 1 | +--- |
| 2 | +title: Monitor Azure Local Migrations Using Diagnostic Settings in Azure Migrate |
| 3 | +description: Learn how to monitor Azure Local migrations using diagnostic settings in Azure Migrate. |
| 4 | +author: alkohli |
| 5 | +ms.topic: how-to |
| 6 | +ms.date: 08/05/2025 |
| 7 | +ms.author: alkohli |
| 8 | +--- |
| 9 | + |
| 10 | +# Monitor Azure Local migrations using diagnostic settings in Azure Migrate |
| 11 | + |
| 12 | +This article describes how to enable diagnostic settings in Azure Migrate via the Azure portal to help monitor Azure Local migrations. Diagnostic logs provide detailed and frequent data about resource operations, helping in monitoring, troubleshooting, and auditing. For more information, see [Diagnostic settings in Azure Monitor](/azure/azure-monitor/platform/diagnostic-settings). |
| 13 | + |
| 14 | +To enable diagnostic settings in Azure Migrate via PowerShell or the Azure CLI, see [Collect and consume log data from your Azure resources](/azure/azure-monitor/essentials/platform-logs-overview). |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +- An Azure subscription with an Azure Migrate project. |
| 19 | +- A Data Replication Vault resource that exists in the same resource group as your Azure Migrate project. This resource is automatically created after you register the source appliance VM with the intent to migrate to Azure Local. |
| 20 | +- A destination selected for your diagnostic log data. For supported destinations, see [diagnostic settings destinations](/azure/azure-monitor/platform/diagnostic-settings#destinations). |
| 21 | + |
| 22 | +## Before you begin |
| 23 | + |
| 24 | +- Azure Migrate supports only logs in Azure Monitor diagnostic settings. Metrics aren't currently supported. |
| 25 | + |
| 26 | +- This article uses Log Analytics workspace and Azure Storage account as destination examples. You can create these resources in the same resource group as your Migrate project. |
| 27 | + |
| 28 | + - **Log Analytics workspace**: Enables querying and analyzing logs. For more information, see [Log Analytics workspace](/azure/azure-monitor/platform/resource-logs?tabs=log-analytics#send-to-log-analytics-workspace). |
| 29 | + - **Azure Storage account**: Stores logs for audit, backup, or static analysis. The storage account can be in a different subscription if the user has the required permissions. For more information, see [Azure Storage account](/azure/azure-monitor/platform/resource-logs?tabs=log-analytics). |
| 30 | + |
| 31 | +## Enable diagnostic log collection |
| 32 | + |
| 33 | +Follow these steps to enable diagnostic logging in the Azure portal. |
| 34 | + |
| 35 | +1. In the Azure portal, go to the resource group where your Azure Migrate project was created. Select the **Data Replication Vault** resource. |
| 36 | +1. Under **Monitoring**, select **Diagnostics settings**. This page contains all previously created diagnostic settings for this resource. |
| 37 | +1. To use a previously created resource, select it. Otherwise, select **+ Add diagnostic setting**. |
| 38 | + |
| 39 | + :::image type="content" source="media/monitor-migration/add-diagnostic-setting.png" alt-text="Screenshot of the Diagnostics settings page showing the Add diagnostic setting button." border="false" lightbox="media/monitor-migration/add-diagnostic-setting.png"::: |
| 40 | + |
| 41 | +1. Enter a name for the setting. |
| 42 | +1. From **Destination details**, select **Send to log Analytics** or **Archive to a storage account**. |
| 43 | +1. When prompted to configure, select the storage account where you want to store the diagnostic logs. |
| 44 | +1. Under **Category groups**, select **all Logs** to enable logging for all log categories, or select individual category under **Categories**. To learn more about individual log category supported by Azure Migrate service, see [Supported logs for Microsoft.DataReplication/replicationVaults](/azure/azure-monitor/reference/supported-logs/microsoft-datareplication-replicationvaults-logs). |
| 45 | +1. Select **Save**. |
| 46 | + |
| 47 | + :::image type="content" source="media/monitor-migration/diagnostic-setting.png" alt-text="Screenshot of the Diagnostics settings page." border="false" lightbox="media/monitor-migration/diagnostic-setting.png"::: |
| 48 | + |
| 49 | + You can now proceed with appliance registration, discovery, and replication. |
| 50 | + |
| 51 | +## View logs in Log Analytics workspace |
| 52 | + |
| 53 | +Follow these steps to explore log analytics data for your resource: |
| 54 | + |
| 55 | +1. In the Azure portal, search for and select **Log Analytics workspaces** from the top search bar. |
| 56 | +1. In the **Log Analytics workspaces** view, search by resource name and select the one you created when enabling diagnostics setting. |
| 57 | +1. Locate and select **Logs**. From this page, you can run queries against your logs. |
| 58 | + |
| 59 | + :::image type="content" source="media/monitor-migration/logs.png" alt-text="Screenshot of the Logs page where you can run queries against your logs." border="false" lightbox="media/monitor-migration/logs.png"::: |
| 60 | + |
| 61 | +### Sample queries |
| 62 | + |
| 63 | +Run the following Kusto query to view the protected items diagnostic logs from Azure Migrate from the last 30 days: |
| 64 | + |
| 65 | +```kusto |
| 66 | +ASRv2ProtectedItems |
| 67 | +| where TimeGenerated > ago(30d) |
| 68 | +``` |
| 69 | + |
| 70 | +## View logs in Azure Storage accounts |
| 71 | + |
| 72 | +Azure Storage accounts provide an object storage solution that is optimized for storing large amounts of unstructured data. |
| 73 | + |
| 74 | +Follow these steps to locate and download the Azure Migrate service resource logs stored in Azure Storage account: |
| 75 | + |
| 76 | +1. In the Azure portal, go to the Storage account you selected when enabling diagnostic settings. |
| 77 | +1. In the left-hand menu, under **Data storage**, select **Containers**. <!--can we add a screenshot here?--> |
| 78 | +1. After replication or migration starts, look for logs with the prefix `insights-logs-<category>`, such as `insights-logs-protecteditems`. Logs might take up to 30 minutes to appear after they are emitted from service to reach the selected Storage account. |
| 79 | +1. To download the logs, open the container and navigate through the folder structure to locate the .json log files. |
| 80 | + |
| 81 | +To learn more about what you can do with diagnostic data in Azure Storage, see [Introduction to Azure Blob Storage](/azure/storage/blobs/storage-blobs-introduction). |
| 82 | + |
| 83 | +## Next steps |
| 84 | + |
| 85 | +- Read [Understand log searches in Azure Monitor logs](/azure/azure-monitor/logs/log-query-overview). |
0 commit comments