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
Copy file name to clipboardExpand all lines: articles/hdinsight/hdinsight-hadoop-oms-log-analytics-tutorial.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.reviewer: jasonh
7
7
ms.service: hdinsight
8
8
ms.topic: conceptual
9
9
ms.custom: seoapr2020
10
-
ms.date: 04/24/2020
10
+
ms.date: 05/13/2020
11
11
---
12
12
13
13
# Use Azure Monitor logs to monitor HDInsight clusters
@@ -35,12 +35,14 @@ If you don't have an Azure subscription, [create a free account](https://azure.m
35
35
36
36
For the instructions on how to create an HDInsight cluster, see [Get started with Azure HDInsight](hadoop/apache-hadoop-linux-tutorial-get-started.md).
37
37
38
-
* Azure PowerShell Az module. See [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az). Ensure you have the latest version. If necessary, run `Update-Module -Name Az`.
38
+
* If using PowerShell, you'll need the [Az Module](https://docs.microsoft.com/powershell/azure/overview). Ensure you have the latest version. If necessary, run `Update-Module -Name Az`.
39
+
40
+
* If wanting to use Azure CLI and you haven't yet installed it, see [Install the Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
39
41
40
42
> [!NOTE]
41
43
> It is recommended to place both the HDInsight cluster and the Log Analytics workspace in the same region for better performance. Azure Monitor logs is not available in all Azure regions.
42
44
43
-
## Enable Azure Monitor logs by using the portal
45
+
## Enable Azure Monitor using the portal
44
46
45
47
In this section, you configure an existing HDInsight Hadoop cluster to use an Azure Log Analytics workspace to monitor jobs, debug logs, and so on.
46
48
@@ -56,7 +58,7 @@ In this section, you configure an existing HDInsight Hadoop cluster to use an Az
56
58
57
59

58
60
59
-
## Enable Azure Monitor logs by using Azure PowerShell
61
+
## Enable Azure Monitor using Azure PowerShell
60
62
61
63
You can enable Azure Monitor logs using the Azure PowerShell Az module [Enable-AzHDInsightMonitoring](https://docs.microsoft.com/powershell/module/az.hdinsight/enable-azhdinsightmonitoring) cmdlet.
62
64
@@ -96,6 +98,29 @@ To disable, the use the [Disable-AzHDInsightMonitoring](https://docs.microsoft.c
You can enable Azure Monitor logs using the Azure CLI `[az hdinsight monitor enable`](https://docs.microsoft.com/cli/azure/hdinsight/monitor?view=azure-cli-latest#az-hdinsight-monitor-enable) command.
104
+
105
+
```azurecli
106
+
# set variables
107
+
export resourceGroup=RESOURCEGROUPNAME
108
+
export cluster=CLUSTERNAME
109
+
export LAW=LOGANALYTICSWORKSPACENAME
110
+
111
+
# Enable the Azure Monitor logs integration on an HDInsight cluster.
112
+
az hdinsight monitor enable --name $cluster --resource-group $resourceGroup --workspace $LAW
113
+
114
+
# Get the status of Azure Monitor logs integration on an HDInsight cluster.
115
+
az hdinsight monitor show --name $cluster --resource-group $resourceGroup
116
+
```
117
+
118
+
To disable, the use the [`az hdinsight monitor disable`](https://docs.microsoft.com/cli/azure/hdinsight/monitor?view=azure-cli-latest#az-hdinsight-monitor-disable) command.
119
+
120
+
```azurecli
121
+
az hdinsight monitor disable --name $cluster --resource-group $resourceGroup
122
+
```
123
+
99
124
## Install HDInsight cluster management solutions
100
125
101
126
HDInsight provides cluster-specific management solutions that you can add for Azure Monitor logs. [Management solutions](../log-analytics/log-analytics-add-solutions.md) add functionality to Azure Monitor logs, providing additional data and analysis tools. These solutions collect important performance metrics from your HDInsight clusters. And provide the tools to search the metrics. These solutions also provide visualizations and dashboards for most cluster types supported in HDInsight. By using the metrics that you collect with the solution, you can create custom monitoring rules and alerts.
0 commit comments