Create Log Analytics workspaces - Azure Monitor (2024)

  • Article

This article shows you how to create a Log Analytics workspace. When you collect logs and data, the information is stored in a workspace. A workspace has a unique workspace ID and resource ID. The workspace name must be unique for a given resource group. After you've created a workspace, configure data sources and solutions to store their data there.

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.
  • Diagnostics or log data from Azure Storage.

Prerequisites

To create a Log Analytics workspace, you need an Azure account with an active subscription. You can create an account for free.

Permissions required

You need Microsoft.OperationalInsights/workspaces/write permissions to the resource group where you want to create the Log Analytics workspace, as provided by the Log Analytics Contributor built-in role, for example.

Create a workspace

  • Portal
  • PowerShell
  • Azure CLI
  • Resource Manager template

Use the Log Analytics workspaces menu to create a workspace.

  1. In the Azure portal, enter Log Analytics in the search box. As you begin typing, the list filters based on your input. Select Log Analytics workspaces.

    Create Log Analytics workspaces - Azure Monitor (1)

  2. Select Add.

  3. Select a Subscription from the dropdown.

  4. Use an existing Resource Group or create a new one.

  5. Provide a name for the new Log Analytics workspace, such as DefaultLAWorkspace. This name must be unique per resource group.

  6. Select an available Region. For more information, see which regions Log Analytics is available in. Search for Azure Monitor in the Search for a product box.

    Create Log Analytics workspaces - Azure Monitor (2)

  7. Select Review + Create to review the settings. Then select Create to create the workspace. A default pricing tier of pay-as-you-go is applied. No charges will be incurred until you start collecting enough data. For more information about other pricing tiers, see Log Analytics pricing details.

Troubleshooting

When you create a workspace that was deleted in the last 14 days and in soft-delete state, the operation could have a different outcome depending on your workspace configuration:

  1. If you provide the same workspace name, resource group, subscription, and region as in the deleted workspace, your workspace will be recovered including its data, configuration, and connected agents.

  2. Workspace names must be unique for a resource group. If you use a workspace name that already exists, or is soft deleted, an error is returned. To permanently delete your soft-deleted name and create a new workspace with the same name, follow these steps:

    1. Recover your workspace.
    2. Permanently delete your workspace.
    3. Create a new workspace by using the same workspace name.

Next steps

Now that you have a workspace available, you can configure collection of monitoring telemetry, run log searches to analyze that data, and add a management solution to provide more data and analytic insights. To learn more:

Create Log Analytics workspaces - Azure Monitor (2024)

FAQs

Create Log Analytics workspaces - Azure Monitor? ›

Log Analytics is a tool in the Azure portal that's used to edit and run log queries against data in the Azure Monitor Logs store. You might write a simple query that returns a set of records and then use features of Log Analytics to sort, filter, and analyze them.

How do I add log Analytics workspace to Azure monitor? ›

Set up Log Analytics for an existing service
  1. In the Azure portal, go to the Diagnostic settings section under Monitoring.
  2. If no settings exist, select Add diagnostic setting. You can also select Edit setting to update existing settings.
  3. Fill out the form on the Diagnostic setting page: ...
  4. Select Save.
Apr 23, 2024

Is log Analytics workspace part of Azure Monitor? ›

Log Analytics is a tool in the Azure portal that's used to edit and run log queries against data in the Azure Monitor Logs store. You might write a simple query that returns a set of records and then use features of Log Analytics to sort, filter, and analyze them.

How do I Create a dashboard in Azure Log Analytics workspace? ›

Create a new dashboard
  1. Sign in to the Azure portal.
  2. From the Azure portal menu, select Dashboard. ...
  3. Select Create, then select Custom. ...
  4. Select the text in the dashboard label and enter a name that will help you easily identify the custom dashboard.
  5. To save the dashboard as is, select Save in the page header.
Sep 3, 2023

How to Create custom logs in Azure Log Analytics workspace? ›

Go to the Log Analytics workspaces menu in the Azure portal and select Tables. The tables in the workspace will appear. Select Create > New custom log (DCR based).

How many log Analytics workspaces should I have? ›

Your design should always start with a single workspace to reduce the complexity of managing multiple workspaces and in querying data from them. There are no performance limitations from the amount of data in your workspace. Multiple services and data sources can send data to the same workspace.

How do I give access to log Analytics workspace? ›

To grant the user read access to a specific table:
  1. From the Log Analytics workspaces menu, select Tables.
  2. Select the ellipsis ( ... ) to the right of your table and select Access control (IAM).
  3. On the Access control (IAM) screen, select Add > Add role assignment.
  4. Select the Reader role and select Next.
Mar 20, 2024

What is the difference between Azure Monitor and Azure logs? ›

Azure Monitor Metrics can only store numeric data in a particular structure, whereas Azure Monitor Logs can store a variety of data types that have their own structures. You can also perform complex analysis on Azure Monitor Logs data by using log queries, which can't be used for analysis of Azure Monitor Metrics data.

Is Azure Log analytics workspace free? ›

The default pricing for Log Analytics is a pay-as-you-go model that's based on ingested data volume and data retention. Each Log Analytics workspace is charged as a separate service and contributes to the bill for your Azure subscription.

What is the difference between Azure app Insights and Log analytics workspace? ›

Application Insights provides real-time monitoring and user-centric insights, while Log Analytics offers a comprehensive log management and analysis solution. Together, they enable you to identify bottlenecks, troubleshoot issues, and optimize your application for better user experience.

How to view log analytics workspace in Azure? ›

To access Azure Log Analytics, you need to sign in to the Azure portal with your Azure account. Once you're signed in, you can access Log Analytics by selecting it from the list of services in the portal. To use Log Analytics, you need to create a Log Analytics workspace in your Azure subscription.

Where does log analytics workspace store data? ›

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 to write data to log analytics workspace? ›

To send customized JSON data to the Log Analytics Workspace, you can use a custom app to deliver it over the Data Ingestion API. Create a new data collection endpoint and a data collection rule by selecting the custom text logs type with some random file pattern such as '/' .

How do I change my log Analytics workspace in Azure? ›

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 .

How do I get all the logs from log Analytics workspace? ›

Simply go to your Log Analytics Workspace, select the "Logs" option, and start writing queries to retrieve the data you need.

How do I connect my log Analytics workspace to a virtual machine? ›

We will then setup the work space to collect System event logs from the test Azure VM.
  1. Login to the Azure Portal.
  2. Search and select Log Analytics workspaces.
  3. Click Create Log Analytics workspace.
  4. Configure: ...
  5. Click OK.
Mar 22, 2020

How do I enable Azure monitor logs? ›

Data collection
  1. Create diagnostic settings to send resource logs from Azure resources to the workspace.
  2. Enable VM insights to collect data from virtual machines.
  3. Configure data sources on the workspace to collect more events and performance data.
Apr 15, 2024

How do I link my log Analytics workspace to my storage account? ›

First, you'll need to import the necessary packages from Pulumi and set up the Azure provider. Then, you'll create a LinkedStorageAccount resource, specifying the workspace name, resource group, data source type, and storage account IDs you want to associate.

Top Articles
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 5802

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.