You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Create a Log Analytics workspace using Azure CLI | Microsoft Docs
3
+
description: Learn how to create a Log Analytics workspace to enable management solutions and data collection from your cloud and on-premises environments with Azure CLI.
4
+
services: log-analytics
5
+
documentationcenter: log-analytics
6
+
author: mgoedtel
7
+
manager: carmonm
8
+
editor: ''
9
+
ms.assetid:
10
+
ms.service: log-analytics
11
+
ms.workload: na
12
+
ms.tgt_pltfrm: na
13
+
ms.devlang: na
14
+
ms.topic: conceptal
15
+
ms.date: 08/27/2018
16
+
ms.author: magoedte
17
+
ms.component: na
18
+
---
19
+
20
+
# Create a Log Analytics workspace with Azure CLI 2.0
21
+
22
+
The Azure CLI 2.0 is used to create and manage Azure resources from the command line or in scripts. This quickstart shows you how to use Azure CLI 2.0 to deploy a Log Analytics workspace in Azure, which is a unique environment with its own data repository, data sources, and solutions. The steps described in this article are required if you intend on collecting data from the following sources:
23
+
24
+
* Azure resources in your subscription
25
+
* On-premises computers monitored by System Center Operations Manager
26
+
* Device collections from System Center Configuration Manager
27
+
* Diagnostic or log data from Azure storage
28
+
29
+
For other sources, such as Azure VMs and Windows or Linux VMs in your environment, see the following topics:
30
+
31
+
*[Collect data from Azure virtual machines](log-analytics-quick-collect-azurevm.md)
32
+
*[Collect data from hybrid Linux computer](log-analytics-quick-collect-linux-computer.md)
33
+
*[Collect data from hybrid Windows computer](log-analytics-quick-collect-windows-computer.md)
34
+
35
+
If you don't have an Azure subscription, create [a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
If you choose to install and use the CLI locally, this quickstart requires that you are running the Azure CLI version 2.0.30 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI 2.0](https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest).
40
+
41
+
## Create a workspace
42
+
Create a worksapce with [az group deployment create](https://docs.microsoft.com/cli/azure/group/deployment?view=azure-cli-latest#az-group-deployment-create). The following example creates a workspace named *TestWorkspace* in the resource group *Lab* in the *eastus* location using a Resource Manager template from your local machine. The JSON template is configured to only prompt you for the name of the workspace, and specifies a default value for the other parameters that would likely be used as a standard configuration in your environment. Or you can store the template in an Azure storage account for shared access in your organization. For further information about working with templates, see [Deploy resources with Resource Manager templates and Azure CLI](../azure-resource-manager/resource-group-template-deploy-cli.md)
43
+
44
+
The following parameters set a default value:
45
+
46
+
* location - defaults to East US
47
+
* sku - defaults to the new Per-GB pricing tier released in the April 2018 pricing model
48
+
49
+
>[!WARNING]
50
+
>If creating or configuring a Log Analytics workspace in a subscription that has opted into the new April 2018 pricing model, the only valid Log Analytics pricing tier is **PerGB2018**.
51
+
>
52
+
53
+
### Create and deploy template
54
+
55
+
1. Copy and paste the following JSON syntax into your file:
2. Edit the template to meet your requirements. Review [Microsoft.OperationalInsights/workspaces template](https://docs.microsoft.com/azure/templates/microsoft.operationalinsights/workspaces) reference to learn what properties and values are supported.
112
+
3. Save this file as **deploylaworkspacetemplate.json** to a local folder.
113
+
4. You are ready to deploy this template. Use the following commands from the folder containing the template:
114
+
115
+
```azurecli
116
+
azure group deployment create <my-resource-group> <my-deployment-name> --TemplateFile deploylaworkspacetemplate.json
117
+
```
118
+
119
+
The deployment can take a few minutes to complete. When it finishes, you see a message similar to the following that includes the result:
120
+
121
+

122
+
123
+
## Next steps
124
+
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 additional data and analytic insights.
125
+
126
+
* To enable data collection from Azure resources with Azure Diagnostics or Azure storage, see [Collect Azure service logs and metrics for use in Log Analytics](log-analytics-azure-storage.md).
127
+
* Add [System Center Operations Manager as a data source](log-analytics-om-agents.md) to collect data from agents reporting your Operations Manager management group and store it in your Log Analytics workspace.
128
+
* Connect [Configuration Manager](log-analytics-sccm.md) to import computers that are members of collections in the hierarchy.
129
+
* Review the [management solutions](log-analytics-add-solutions.md) available and how to add or remove a solution from your workspace.
title: Create a Log Analytics workspace using Azure PowerShell| Microsoft Docs
3
+
description: Learn how to create a Log Analytics workspace to enable management solutions and data collection from your cloud and on-premises environments with Azure PowerShell.
4
+
services: log-analytics
5
+
documentationcenter: log-analytics
6
+
author: mgoedtel
7
+
manager: carmonm
8
+
editor: ''
9
+
ms.assetid:
10
+
ms.service: log-analytics
11
+
ms.workload: na
12
+
ms.tgt_pltfrm: na
13
+
ms.devlang: na
14
+
ms.topic: conceptal
15
+
ms.date: 08/27/2018
16
+
ms.author: magoedte
17
+
ms.component: na
18
+
---
19
+
20
+
# Create a Log Analytics workspace with Azure PowerShell
21
+
22
+
The Azure PowerShell module is used to create and manage Azure resources from the PowerShell command line or in scripts. This quickstart shows you how to use the Azure PowerShell module to to deploy a Log Analytics workspace in Azure, which is a unique environment with its own data repository, data sources, and solutions. The steps described in this article are required if you intend on collecting data from the following sources:
23
+
24
+
* Azure resources in your subscription
25
+
* On-premises computers monitored by System Center Operations Manager
26
+
* Device collections from System Center Configuration Manager
27
+
* Diagnostic or log data from Azure storage
28
+
29
+
For other sources, such as Azure VMs and Windows or Linux VMs in your environment, see the following topics:
30
+
31
+
*[Collect data from Azure virtual machines](log-analytics-quick-collect-azurevm.md)
32
+
*[Collect data from hybrid Linux computer](log-analytics-quick-collect-linux-computer.md)
33
+
*[Collect data from hybrid Windows computer](log-analytics-quick-collect-windows-computer.md)
34
+
35
+
If you don't have an Azure subscription, create [a free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
If you choose to install and use the PowerShell locally, this tutorial requires the Azure PowerShell module version 5.7.0 or later. Run `Get-Module -ListAvailable AzureRM` to find the version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-azurerm-ps). If you are running PowerShell locally, you also need to run `Connect-AzureRmAccount` to create a connection with Azure.
40
+
41
+
## Create a workspace
42
+
Create a worksapce with [New-AzureRmResourceGroupDeployment](/powershell/module/azurerm.resources/new-azurermresourcegroupdeployment). The following example creates a workspace named *TestWorkspace* in the resource group *Lab* in the *eastus* location using a Resource Manager template from your local machine. The JSON template is configured to only prompt you for the name of the workspace, and specifies a default value for the other parameters that would likely be used as a standard configuration in your environment.
43
+
44
+
The following parameters set a default value:
45
+
46
+
* location - defaults to East US
47
+
* sku - defaults to the new Per-GB pricing tier released in the April 2018 pricing model
48
+
49
+
>[!WARNING]
50
+
>If creating or configuring a Log Analytics workspace in a subscription that has opted into the new April 2018 pricing model, the only valid Log Analytics pricing tier is **PerGB2018**.
51
+
>
52
+
53
+
### Create and deploy template
54
+
55
+
1. Copy and paste the following JSON syntax into your file:
2. Edit the template to meet your requirements. Review [Microsoft.OperationalInsights/workspaces template](https://docs.microsoft.com/azure/templates/microsoft.operationalinsights/workspaces) reference to learn what properties and values are supported.
112
+
3. Save this file as **deploylaworkspacetemplate.json** to a local folder.
113
+
4. You are ready to deploy this template. Use the following commands from the folder containing the template:
The deployment can take a few minutes to complete. When it finishes, you see a message similar to the following that includes the result:
120
+
121
+

122
+
123
+
## Next steps
124
+
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 additional data and analytic insights.
125
+
126
+
* To enable data collection from Azure resources with Azure Diagnostics or Azure storage, see [Collect Azure service logs and metrics for use in Log Analytics](log-analytics-azure-storage.md).
127
+
* Add [System Center Operations Manager as a data source](log-analytics-om-agents.md) to collect data from agents reporting your Operations Manager management group and store it in your Log Analytics workspace.
128
+
* Connect [Configuration Manager](log-analytics-sccm.md) to import computers that are members of collections in the hierarchy.
129
+
* Review the [management solutions](log-analytics-add-solutions.md) available and how to add or remove a solution from your workspace.
title: Create a workspace in Azure Log Analytics | Microsoft Docs
3
-
description: Learn how to create a Log Analytics workspace to enable management solutions and data collection from your cloud and on-premises environments.
2
+
title: Create a Log Analytics workspace in the Azure Portal | Microsoft Docs
3
+
description: Learn how to create a Log Analytics workspace to enable management solutions and data collection from your cloud and on-premises environments in the Azure portal.
4
4
services: log-analytics
5
5
documentationcenter: log-analytics
6
6
author: mgoedtel
@@ -12,41 +12,44 @@ ms.workload: na
12
12
ms.tgt_pltfrm: na
13
13
ms.devlang: na
14
14
ms.topic: conceptal
15
-
ms.date: 04/02/2018
15
+
ms.date: 08/23/2018
16
16
ms.author: magoedte
17
17
ms.component: na
18
18
---
19
19
20
20
# Create a Log Analytics workspace in the Azure portal
21
-
In the Azure Portal you can set up a Log Analytics workspace, which is a unique Log Analytics environment with its own data repository, data sources, and solutions. The steps described in this article are required if you intend on collecting data from the following sources:
21
+
In the Azure portal you can set up a Log Analytics workspace, which is a unique Log Analytics environment with its own data repository, data sources, and solutions. The steps described in this article are required if you intend on collecting data from the following sources:
22
22
23
23
* Azure resources in your subscription
24
24
* On-premises computers monitored by System Center Operations Manager
25
25
* Device collections from System Center Configuration Manager
26
26
* Diagnostic or log data from Azure storage
27
27
28
-
For other sources, such as Azure VMs and Windows or Linux computers in your environment, see the following topics:
28
+
For other sources, such as Azure VMs and Windows or Linux VMs in your environment, see the following topics:
29
29
30
-
*[Collect data about Azure Virtual Machines](log-analytics-quick-collect-azurevm.md)
31
-
*[Collect data about Linux computers](log-analytics-quick-collect-linux-computer.md)
32
-
*[Collect data about Windows computers](log-analytics-quick-collect-windows-computer.md)
30
+
*[Collect data from Azure virtual machines](log-analytics-quick-collect-azurevm.md)
31
+
*[Collect data from hybrid Linux computer](log-analytics-quick-collect-linux-computer.md)
32
+
*[Collect data from hybrid Windows computer](log-analytics-quick-collect-windows-computer.md)
33
33
34
34
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
35
35
36
-
## Log in to Azure portal
37
-
Log in to the Azure portal at [https://portal.azure.com](https://portal.azure.com).
36
+
## Sign in to Azure portal
37
+
Sign in to the Azure portal at [https://portal.azure.com](https://portal.azure.com).
38
38
39
39
## Create a workspace
40
-
1. In the Azure portal, click **All services**. In the list of resources, type **Log Analytics**. As you begin typing, the list filters based on your input. Select **Log Analytics**.<br><br> <br><br>
40
+
1. In the Azure portal, click **All services**. In the list of resources, type **Log Analytics**. As you begin typing, the list filters based on your input. Select **Log Analytics**.
2. Click **Create**, and then select choices for the following items:
42
45
43
46
* Provide a name for the new **OMS Workspace**, such as *DefaultLAWorkspace*.
44
47
* Select a **Subscription** to link to by selecting from the drop-down list if the default selected is not appropriate.
45
-
* For **Resource Group**, chose to use an existing resource group already setup or create a new one.
46
-
* Select an available **Location**. For additional information, see which [regions Log Analytics is available in](https://azure.microsoft.com/regions/services/).
47
-
* If you are creating a workspace in a new subscription created after April 2, 2018, it will automatically use the *Per GB* pricing plan and the option to select a pricing tier will not be available. If you are creating a workspace for an existing subscription created before April 2, or to subscription that was tied to an existing EA enrollment, select your preferred pricing tier. For additional information about the particular tiers, see [Log Analytics Pricing Details](https://azure.microsoft.com/pricing/details/log-analytics/).
48
+
* For **Resource Group**, choose to use an existing resource group already setup or create a new one.
49
+
* Select an available **Location**. For more information, see which [regions Log Analytics is available in](https://azure.microsoft.com/regions/services/).
50
+
* If you are creating a workspace in a new subscription created after April 2, 2018, it will automatically use the *Per GB* pricing plan and the option to select a pricing tier will not be available. If you are creating a workspace for an existing subscription created before April 2, or to subscription that was tied to an existing Enterprise Agreement (EA) enrollment, select your preferred pricing tier. For more information about the particular tiers, see [Log Analytics Pricing Details](https://azure.microsoft.com/pricing/details/log-analytics/).
3. After providing the required information on the **OMS Workspace** pane, click **OK**.
52
55
@@ -56,7 +59,6 @@ While the information is verified and the workspace is created, you can track it
56
59
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 additional data and analytic insights.
57
60
58
61
* To enable data collection from Azure resources with Azure Diagnostics or Azure storage, see [Collect Azure service logs and metrics for use in Log Analytics](log-analytics-azure-storage.md).
59
-
*[Add System Center Operations Manager as a data source](log-analytics-om-agents.md) to collect data from agents reporting your Operations Manager management group and store it in your Log Analytics workspace repository.
62
+
*[Add System Center Operations Manager as a data source](log-analytics-om-agents.md) to collect data from agents reporting your Operations Manager management group and store it in your Log Analytics workspace.
60
63
* Connect [Configuration Manager](log-analytics-sccm.md) to import computers that are members of collections in the hierarchy.
61
-
* Review the [management solutions](/log-analytics-add-solutions.md) available and how to add or remove a solution from your workspace.
62
-
64
+
* Review the [management solutions](log-analytics-add-solutions.md) available and how to add or remove a solution from your workspace.
0 commit comments