Relocation guidance for Log Analytics workspace (2024)

Edit

Share via

  • Article

A relocation plan for Log Analytics workspace must include the relocation of any resources that log data with Log Analytics Workspace.

Log Analytics workspace doesn't natively support migrating workspace data from one region to another and associated devices. Instead, you must create a new Log Analytics workspace in the target region and reconfigure the devices and settings in the new workspace.

The diagram below illustrates the relocation pattern for a Log Analytics workspace. The red flow lines represent the redeployment of the target instance along with data movement and updating domains and endpoints.

Relocation guidance for Log Analytics workspace (1)

Relocation to availability zone support

Azure availability zones are at least three physically separate groups of datacenters within each Azure region. Datacenters within each zone are equipped with independent power, cooling, and networking infrastructure. In the case of a local zone failure, availability zones are designed so that if the one zone is affected, regional services, capacity, and high availability are supported by the remaining two zones.

Failures can range from software and hardware failures to events such as earthquakes, floods, and fires. Tolerance to failures is achieved with redundancy and logical isolation of Azure services. For more detailed information on availability zones in Azure, see Regions and availability zones.

Azure availability zones-enabled services are designed to provide the right level of reliability and flexibility. They can be configured in two ways. They can be either zone redundant, with automatic replication across zones, or zonal, with instances pinned to a specific zone. You can also combine these approaches. For more information on zonal vs. zone-redundant architecture, see Recommendations for using availability zones and regions.

If you want to relocate your Log Analytics workspace to a region that supports availability zones:

  • Read Azure availability zone migration baseline to assess the availability-zone readiness of your workload or application.
  • Follow the guidance in Migrate Log Analytics to availability zone support.

Prerequisites

  • To export the workspace configuration to a template that can be deployed to another region, you need the Log Analytics Contributor or Monitoring Contributor role, or higher.

  • Identify all the resources that are currently associated with your workspace, including:

    • Connected agents: Enter Logs in your workspace and query a heartbeat table to list connected agents.

      Heartbeat| summarize by Computer, Category, OSType, _ResourceId
    • Diagnostic settings: Resources can send logs to Azure Diagnostics or dedicated tables in your workspace. Enter Logs in your workspace, and run this query for resources that send data to the AzureDiagnostics table:

      AzureDiagnostics| where TimeGenerated > ago(12h)| summarize by ResourceProvider , ResourceType, Resource| sort by ResourceProvider, ResourceType

      Run this query for resources that send data to dedicated tables:

      search *| where TimeGenerated > ago(12h)| where isnotnull(_ResourceId)| extend ResourceProvider = split(_ResourceId, '/')[6]| where ResourceProvider !in ('microsoft.compute', 'microsoft.security')| extend ResourceType = split(_ResourceId, '/')[7]| extend Resource = split(_ResourceId, '/')[8]| summarize by tostring(ResourceProvider) , tostring(ResourceType), tostring(Resource)| sort by ResourceProvider, ResourceType
    • Installed solutions: Select Legacy solutions on the workspace navigation pane for a list of installed solutions.

    • Data collector API: Data arriving through a Data Collector API is stored in custom log tables. For a list of custom log tables, select Logs on the workspace navigation pane, and then select Custom log on the schema pane.

    • Linked services: Workspaces might have linked services to dependent resources such as an Azure Automation account, a storage account, or a dedicated cluster. Remove linked services from your workspace. Reconfigure them manually in the target workspace.

    • Alerts: To list alerts, select Alerts on your workspace navigation pane, and then select Manage alert rules on the toolbar. Alerts in workspaces created after June 1, 2019, or in workspaces that were upgraded from the Log Analytics Alert API to the scheduledQueryRules API can be included in the template.

      You can check if the scheduledQueryRules API is used for alerts in your workspace. Alternatively, you can configure alerts manually in the target workspace.

    • Query packs: A workspace can be associated with multiple query packs. To identify query packs in your workspace, select Logs on the workspace navigation pane, select queries on the left pane, and then select the ellipsis to the right of the search box. A dialog with the selected query packs opens on the right. If your query packs are in the same resource group as the workspace that you're moving, you can include it with this migration.

  • Verify that your Azure subscription allows you to create Log Analytics workspaces in the target region.

Downtime

To understand the possible downtimes involved, see Cloud Adoption Framework for Azure: Select a relocation method.

Prepare

The following procedures show how to prepare the workspace and resources for the move by using a Resource Manager template.

Note

Not all resources can be exported through a template. You'll need to configure these separately after the workspace is created in the target region.

  1. Sign in to the Azure portal, and then select Resource Groups.

  2. Find the resource group that contains your workspace and select it.

  3. To view an alert resource, select the Show hidden types checkbox.

  4. Select the Type filter. Select Log Analytics workspace, Solution, SavedSearches, microsoft.insights/scheduledqueryrules, defaultQueryPack, and other workspace-related resources that you have (such as an Automation account). Then select Apply.

  5. Select the workspace, solutions, saved searches, alerts, query packs, and other workspace-related resources that you have (such as an Automation account). Then select Export template on the toolbar.

    Note

    Microsoft Sentinel can't be exported with a template. You need to onboard Sentinel to a target workspace.

  6. Select Deploy on the toolbar to edit and prepare the template for deployment.

  7. Select Edit parameters on the toolbar to open the parameters.json file in the online editor.

  8. To edit the parameters, change the value property under parameters. Here's an example:

    { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { "workspaces_name": { "value": "my-workspace-name" }, "workspaceResourceId": { "value": "/subscriptions/resource-id/resourceGroups/resource-group-name/providers/Microsoft.OperationalInsights/workspaces/workspace-name" }, "alertName": { "value": "my-alert-name" }, "querypacks_name": { "value": "my-default-query-pack-name" } }}
  9. Select Save in the editor.

Edit the template

  1. Select Edit template on the toolbar to open the template.json file in the online editor.

  2. To edit the target region where the Log Analytics workspace will be deployed, change the location property under resources in the online editor.

    To get region location codes, see Data residency in Azure. The code for a region is the region name with no spaces. For example, Central US should be centralus.

  3. Remove linked-services resources (microsoft.operationalinsights/workspaces/linkedservices) if they're present in the template. You should reconfigure these resources manually in the target workspace.

    The following example template includes the workspace, saved search, solutions, alerts, and query pack:

    { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "workspaces_name": { "type": "String" }, "workspaceResourceId": { "type": "String" }, "alertName": { "type": "String" }, "querypacks_name": { "type": "String" } }, "variables": {}, "resources": [ { "type": "microsoft.operationalinsights/workspaces", "apiVersion": "2020-08-01", "name": "[parameters('workspaces_name')]", "location": "france central", "properties": { "sku": { "name": "pergb2018" }, "retentionInDays": 30, "features": { "enableLogAccessUsingOnlyResourcePermissions": true }, "workspaceCapping": { "dailyQuotaGb": -1 }, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery": "Enabled" } }, { "type": "Microsoft.OperationalInsights/workspaces/savedSearches", "apiVersion": "2020-08-01", "name": "[concat(parameters('workspaces_name'), '/2b5112ec-5ad0-5eda-80e9-ad98b51d4aba')]", "dependsOn": [ "[resourceId('Microsoft.OperationalInsights/workspaces', parameters('workspaces_name'))]" ], "properties": { "category": "VM Monitoring", "displayName": "List all versions of curl in use", "query": "VMProcess\n| where ExecutableName == \"curl\"\n| distinct ProductVersion", "tags": [], "version": 2 } }, { "type": "Microsoft.OperationsManagement/solutions", "apiVersion": "2015-11-01-preview", "name": "[concat('Updates(', parameters('workspaces_name'))]", "location": "france central", "dependsOn": [ "[resourceId('microsoft.operationalinsights/workspaces', parameters('workspaces_name'))]" ], "plan": { "name": "[concat('Updates(', parameters('workspaces_name'))]", "promotionCode": "", "product": "OMSGallery/Updates", "publisher": "Microsoft" }, "properties": { "workspaceResourceId": "[resourceId('microsoft.operationalinsights/workspaces', parameters('workspaces_name'))]", "containedResources": [ "[concat(resourceId('microsoft.operationalinsights/workspaces', parameters('workspaces_name')), '/views/Updates(', parameters('workspaces_name'), ')')]" ] } } { "type": "Microsoft.OperationsManagement/solutions", "apiVersion": "2015-11-01-preview", "name": "[concat('VMInsights(', parameters('workspaces_name'))]", "location": "france central", "plan": { "name": "[concat('VMInsights(', parameters('workspaces_name'))]", "promotionCode": "", "product": "OMSGallery/VMInsights", "publisher": "Microsoft" }, "properties": { "workspaceResourceId": "[resourceId('microsoft.operationalinsights/workspaces', parameters('workspaces_name'))]", "containedResources": [ "[concat(resourceId('microsoft.operationalinsights/workspaces', parameters('workspaces_name')), '/views/VMInsights(', parameters('workspaces_name'), ')')]" ] } }, { "type": "microsoft.insights/scheduledqueryrules", "apiVersion": "2021-08-01", "name": "[parameters('alertName')]", "location": "france central", "properties": { "displayName": "[parameters('alertName')]", "severity": 3, "enabled": true, "evaluationFrequency": "PT5M", "scopes": [ "[parameters('workspaceResourceId')]" ], "windowSize": "PT15M", "criteria": { "allOf": [ { "query": "Heartbeat | where computer == 'my computer name'", "timeAggregation": "Count", "operator": "LessThan", "threshold": 14, "failingPeriods": { "numberOfEvaluationPeriods": 1, "minFailingPeriodsToAlert": 1 } } ] }, "autoMitigate": true, "actions": {} } }, { "type": "Microsoft.OperationalInsights/querypacks", "apiVersion": "2019-09-01-preview", "name": "[parameters('querypacks_name')]", "location": "francecentral", "properties": {} }, { "type": "Microsoft.OperationalInsights/querypacks/queries", "apiVersion": "2019-09-01-preview", "name": "[concat(parameters('querypacks_name'), '/00000000-0000-0000-0000-000000000000')]", "dependsOn": [ "[resourceId('Microsoft.OperationalInsights/querypacks', parameters('querypacks_name'))]" ], "properties": { "displayName": "my-query-name", "body": "my-query-text", "related": { "categories": [], "resourceTypes": [ "microsoft.operationalinsights/workspaces" ] }, "tags": { "labels": [] } } } ]}
  4. Select Save in the online editor.

Redeploy

  1. Select Subscription to choose the subscription where the target workspace will be deployed.

  2. Select Resource group to choose the resource group where the target workspace will be deployed. You can select Create new to create a new resource group for the target workspace.

  3. Verify that Region is set to the target location where you want the network security group to be deployed.

  4. Select the Review + create button to verify your template.

  5. Select Create to deploy the workspace and the selected resource to the target region.

  6. Your workspace, including selected resources, is now deployed in the target region. You can complete the remaining configuration in the workspace for paring functionality to the original workspace.

    • Connect agents: Use any of the available options, including Data Collection Rules, to configure the required agents on virtual machines and virtual machine scale sets and to specify the new target workspace as the destination.
    • Diagnostic settings: Update diagnostic settings in identified resources, with the target workspace as the destination.
    • Install solutions: Some solutions, such as Microsoft Sentinel, require certain onboarding procedures and weren't included in the template. You should onboard them separately to the new workspace.
    • Configure the Data Collector API: Configure Data Collector API instances to send data to the target workspace.
    • Configure alert rules: When alerts aren't exported in the template, you need to configure them manually in the target workspace.
  7. Verify that new data isn't ingested to the original workspace. Run the following query in your original workspace, and observe that there's no ingestion after the migration:

    search *| where TimeGenerated > ago(12h)| summarize max(TimeGenerated) by Type

After data sources are connected to the target workspace, ingested data is stored in the target workspace. Older data stays in the original workspace and is subject to the retention policy. You can perform a cross-workspace query. If both workspaces were assigned the same name, use a qualified name (subscriptionName/resourceGroup/componentName) in the workspace reference.

Here's an example for a query across two workspaces that have the same name:

union workspace('subscription-name1/<resource-group-name1/<original-workspace-name>')Update, workspace('subscription-name2/<resource-group-name2/<target-workspace-name>').Update, | where TimeGenerated >= ago(1h)| where UpdateState == "Needed"| summarize dcount(Computer) by Classification

Discard

If you want to discard the source workspace, delete the exported resources or the resource group that contains these resources:

  1. Select the target resource group in the Azure portal.

  2. On the Overview page:

    • If you created a new resource group for this deployment, select Delete resource group on the toolbar to delete the resource group.
    • If the template was deployed to an existing resource group, select the resources that were deployed with the template, and then select Delete on the toolbar to delete selected resources.

Clean up

While new data is being ingested to your new workspace, older data in the original workspace remains available for query and is subject to the retention policy defined in the workspace. We recommend that you keep the original workspace for as long as you need older data to query across workspaces.

If you no longer need access to older data in the original workspace:

  1. Select the original resource group in the Azure portal.
  2. Select any resources that you want to remove, and then select Delete on the toolbar.

Related content

  • Move resources to a new resource group or subscription

  • Move Azure VMs to another region

Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.

Submit and view feedback for

Relocation guidance for Log Analytics workspace (2024)

FAQs

How do I move Log Analytics workspace? ›

Move your workspace

Open the Log Analytics workspaces menu and then select your workspace. On the Overview page, select change next to either Resource group or Subscription name. A new page opens with a list of resources related to the workspace.

What is the solution in Azure Log Analytics Workspace? ›

Solutions in Log Analytics Workspace: "Solutions" in Log Analytics Workspace refers to pre-packaged solutions or management packs that can be deployed to collect, analyze, and act on data from various sources.

How many Log Analytics workspaces should I have? ›

A single Log Analytics workspace might be sufficient for many environments that use Azure Monitor and Microsoft Sentinel. But many organizations will create multiple workspaces to optimize costs and better meet different business requirements.

What is the difference between workspace and Log Analytics workspace? ›

Each workspace has its own data repository, configuration, and permissions. Log Analytics workspaces contain logs and metrics data from multiple Azure resources, whereas Azure Monitor workspaces currently contain only metrics related to Prometheus.

How do I move the location of event logs? ›

Open the Event Viewer. Right-click the log name (for example, System) under Windows Logs in the left pane and select Properties. Change the Log path value to the location of the created folder and leave the log file name at the end of the path (for example, C:\EventLogs\System. evtx).

Where is Log Analytics workspace stored? ›

As you might have guessed, the data is stored in datacenters of the cloud (in the same region you have set up your LA workspace). Data is stored in the OMS repository as records.

How do I clean up my Log Analytics workspace? ›

  1. Sign in to the Azure portal.
  2. In the Azure portal, select All services. ...
  3. In the list of Log Analytics workspaces, select a workspace. ...
  4. A confirmation page appears that shows the data ingestion to the workspace over the past week.
  5. Enter the name of the workspace to confirm and then select Delete.
Dec 21, 2023

What is the benefit of Log Analytics workspace in Azure? ›

Some of the main features of Azure Log Analytics include:
  • Wide range of data sources: Once you have a workspace set up, you can start collecting data from your resources and applications. ...
  • Powerful query language: Log Analytics provides a powerful query language that you can use to filter, group, and aggregate data.

Do I need Log Analytics workspace? ›

You need a Log Analytics workspace if you collect data from: Azure resources in your subscription. On-premises computers monitored by System Center Operations Manager. Device collections from Configuration Manager.

What is the limit of log analytics WorkSpace? ›

Log Analytics workspace has the limit of only 30000 rows. To achieve your requirement, you can try Azure Data explorer as a workaround.

What is the maximum retention for log analytics workspaces? ›

You can set a Log Analytics workspace's default retention in the Azure portal to 30, 31, 60, 90, 120, 180, 270, 365, 550, and 730 days. You can apply a different setting to specific tables by configuring retention and archive at the table level.

What is the daily limit for log analytics? ›

Near the top of the window, select Daily cap. Set to ON and enter the desired daily cap: The daily cap must be set to a minimum of 0.023 GB/day.

How do I pull data from log analytics workspace? ›

  1. On the Log Analytics workspace menu in the Azure portal, select Data Export under the Settings section. Select New export rule at the top of the pane.
  2. Follow the steps, and then select Create. Only the tables with data in them are displayed under "Source" tab.
Jun 14, 2024

Is log analytics deprecated? ›

On the 31st of August 2024, Microsoft will deprecate the Log Analytics VM Agent. This change has been announced years ago, but still many are not prepared. How can you assess your environment and migrate to the Azure Monitor Agent before the agent will stop working.

How do I change my workspace location in Azure? ›

Redeploy
  1. Select Subscription to choose the subscription where the target workspace will be deployed.
  2. Select Resource group to choose the resource group where the target workspace will be deployed. ...
  3. Verify that Region is set to the target location where you want the network security group to be deployed.
Apr 24, 2024

How do I move my Google Analytics account? ›

How to Move Google Analytics Property to Another Account
  1. Step 1: Open Google Analytics 4 Admin Panel and Go to Settings. ...
  2. Step 2: Select Property Settings and Click “Move Property” ...
  3. Step 3: Select the Destination Account and Confirm Property Permissions. ...
  4. Step 4: Change Google Analytics Property Ownership.
Feb 18, 2023

How do I change the Log Analytics workspace in a VM? ›

Sign into the Azure portal. Select Browse on the left side of the portal, and then go to Log Analytics (OMS) and select it. In your list of Log Analytics workspaces, select the one that you want to use with the Azure VM.

How do I move dataflow to another workspace? ›

1) Select the export template option in the Dataflow Gen2 toolbar. 2) Save the JSON file to your local machine or a cloud storage location. 3) Create a new Dataflow Gen2 in another workspace and select the Import from Power Query template.

Top Articles
How to Trade Cryptocurrency: A Beginners Guide • Benzinga
United States Stock Market Index - Quote - Chart - Historical Data
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Chris Provost Daughter Addie
Tryst Utah
Trevor Goodwin Obituary St Cloud
Western Union Mexico Rate
Bloxburg Image Ids
New Day Usa Blonde Spokeswoman 2022
Whiskeytown Camera
Anki Fsrs
Hmr Properties
Busted Newspaper S Randolph County Dirt The Press As Pawns
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
Zack Fairhurst Snapchat
20 Different Cat Sounds and What They Mean
Healthier Homes | Coronavirus Protocol | Stanley Steemer - Stanley Steemer | The Steem Team
Kirksey's Mortuary - Birmingham - Alabama - Funeral Homes | Tribute Archive
Daytonaskipthegames
Beverage Lyons Funeral Home Obituaries
Clare Briggs Guzman
Aes Salt Lake City Showdown
A Cup of Cozy – Podcast
Ecampus Scps Login
Weve Got You Surrounded Meme
Horn Rank
Fleet Farm Brainerd Mn Hours
4 Times Rihanna Showed Solidarity for Social Movements Around the World
Cfv Mychart
Bfsfcu Truecar
Little Einsteins Transcript
Best New England Boarding Schools
Craigslist Maryland Baltimore
Xemu Vs Cxbx
Western Gold Gateway
The Land Book 9 Release Date 2023
Topos De Bolos Engraçados
The best specialist spirits store | Spirituosengalerie Stuttgart
Bill Manser Net Worth
Post A Bid Monticello Mn
Gamestop Store Manager Pay
Rocket Lab hiring Integration &amp; Test Engineer I/II in Long Beach, CA | LinkedIn
About Us
Deezy Jamaican Food
Doe mee met ons loyaliteitsprogramma | Victoria Club
Petfinder Quiz
Displacer Cub – 5th Edition SRD
Craigslist Sparta Nj
Minecraft Enchantment Calculator - calculattor.com
What Responsibilities Are Listed In Duties 2 3 And 4
Olay Holiday Gift Rebate.com
Latest Posts
Article information

Author: Fredrick Kertzmann

Last Updated:

Views: 6728

Rating: 4.6 / 5 (66 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Fredrick Kertzmann

Birthday: 2000-04-29

Address: Apt. 203 613 Huels Gateway, Ralphtown, LA 40204

Phone: +2135150832870

Job: Regional Design Producer

Hobby: Nordic skating, Lacemaking, Mountain biking, Rowing, Gardening, Water sports, role-playing games

Introduction: My name is Fredrick Kertzmann, I am a gleaming, encouraging, inexpensive, thankful, tender, quaint, precious person who loves writing and wants to share my knowledge and understanding with you.