Edit

Create a Log Analytics workspace

A Log Analytics workspace is a data store for collecting any type of log data from all your Azure and non-Azure resources and applications. Send all log data to one Log Analytics workspace unless specific business needs require multiple workspaces, as described in Design a Log Analytics workspace architecture.

Prerequisites

To create a Log Analytics workspace, you need an Azure account with an active subscription. 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

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.

    Screenshot that shows the search bar at the top of the Azure home screen. As you begin typing, the list of search results filters based on your input.

  2. Select Create.

  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.

    Screenshot that shows the boxes that need to be populated on the Basics tab of the Create Log Analytics workspace screen.

  7. Select Review + Create to review the settings. Then select Create to create the workspace. A default pay-as-you-go pricing tier is applied, and no charges accrue until data collection begins. For more information about pricing tiers, see Log Analytics pricing details.

Troubleshooting

When you create a workspace that you deleted in the last 14 days and it's in soft-delete state, the operation can have different outcomes depending on your workspace configuration:

  1. If you create a workspace and the parameters you provide are the same workspace name, resource group, subscription, and region as a deleted workspace, you recover your deleted workspace 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, you get an error. 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 a workspace is available, configure collection of monitoring telemetry and run log searches to analyze that data. To learn more: