Skip to content

Commit 377ac39

Browse files
authored
edit formatting, indents
1 parent c7feabe commit 377ac39

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

articles/hdinsight/selective-logging-analysis.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Use Selective logging feature using script action in Azure HDInsight clusters
2+
title: Use selective logging feature with script action in Azure HDInsight clusters
33
description: Learn how to use Selective logging feature using script action to monitor logs.
44
ms.service: hdinsight
55
ms.topic: how-to
66
ms.custom: seoapr2020, devx-track-azurepowershell, references-regions, devx-track-azurecli
77
ms.date: 07/31/2022
88
---
99

10-
# Learn how to use selective logging feature using script action in Azure HDInsight
10+
# Learn how to use selective logging feature with script action in Azure HDInsight
1111

1212
[Azure Monitor logs](../azure-monitor/logs/log-query-overview.md) is an Azure Monitor service that monitors your cloud and on-premises environments. The monitoring is to maintain their availability and performance. It collects data generated by resources in your cloud, on-premises environments and from other monitoring tools. The data is used to provide analysis across multiple sources by enabling selective logging feature using script action in Azure portal in HDInsight.
1313

@@ -28,76 +28,77 @@ Selective logging allows you to enable/disable all the tables or enable selectiv
2828
## Prerequisites
2929

3030
* A Log Analytics workspace. You can think of this workspace as a unique Azure Monitor logs environment with its own data repository, data sources, and solutions. For the instructions, see [Create a Log Analytics workspace](../azure-monitor/vm/monitor-virtual-machine.md).
31-
3231
* An Azure HDInsight cluster. Currently, you can use selective logging feature with the following HDInsight cluster types:
32+
* Hadoop
33+
* HBase
34+
* Interactive Query
35+
* Spark
3336

34-
* Hadoop
35-
* HBase
36-
* Interactive Query
37-
* Spark
38-
39-
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+
For the instructions on how to create an HDInsight cluster, see [Get started with Azure HDInsight](hadoop/apache-hadoop-linux-tutorial-get-started.md).
4038

4139
## Enable/disable logs using script action for multiple tables and log types
4240

4341
1. Go to script action in your cluster and create a new Script Action for disabling/enabling table and log type.
4442

45-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-submit-script-action.png" alt-text="Screenshot showing select submit script action.":::
43+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-submit-script-action.png" alt-text="Screenshot showing select submit script action.":::
4644

47-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/submit-script-action-window.png" alt-text="Screenshot showing submit script action window.":::
45+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/submit-script-action-window.png" alt-text="Screenshot showing submit script action window.":::
4846

49-
1. In the script type we can select **custom**.
50-
1. Name the script. For example, Disable two tables and two sources.
47+
1. In the script type, select **custom**.
48+
1. Name the script. For example, **Disable two tables and two sources**.
5149
1. Bash Script URL must be the link of the [selectiveLoggingScript.sh](https://hdiconfigactions.blob.core.windows.net/log-analytics-patch/selectiveLoggingScripts/selectiveLoggingScript.sh).
5250
1. Select all the nodes of the cluster. For example, Head Node, Worker node, Zookeepr node.
53-
1. Define the parameters in the parameter box. For example,
54-
1. for Spark `spark HDInsightSparkLogs:SparkExecutorLog --disable`
55-
1. for Interactivehive `interactivehive HDInsightSparkLogs:SparkExecutorLog --enable`
56-
1. for Hadoop `hadoop HDInsightSparkLogs:SparkExecutorLog --disable`
57-
1. for HBase `hbase HDInsightSparkLogs: HDInsightHBaseLogs --enable`
51+
1. Define the parameters in the parameter box. For example:
52+
- Spark: `spark HDInsightSparkLogs:SparkExecutorLog --disable`
53+
- Interactivehive: `interactivehive HDInsightSparkLogs:SparkExecutorLog --enable`
54+
- Hadoop: `hadoop HDInsightSparkLogs:SparkExecutorLog --disable`
55+
- HBase: `hbase HDInsightSparkLogs: HDInsightHBaseLogs --enable`
5856

59-
For more details, see [Parameters](#parameters-syntax) section.
57+
For more details, see [Parameters](#parameters-syntax) section.
6058

6159
1. Select Create.
62-
1. After 1-2 minutes you'll see a green tick next to your script action history, which means script has successfully run.
60+
1. After a few minutes, you'll see a green tick next to your script action history, which means script has successfully run.
6361

64-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/enable-table-and-log-types.png" alt-text="Screenshot showing enable table and log types.":::
62+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/enable-table-and-log-types.png" alt-text="Screenshot showing enable table and log types.":::
6563

66-
1. You will see the desired changes in the log analytics workspace.
64+
You will see the desired changes in the log analytics workspace.
6765

6866
## Troubleshooting
67+
6968
### Scenario 1
7069

7170
If Script Action is submitted but there are no changes in the log analytics workspace.
7271

7372
1. Go to Ambari Home and check debug information.
7473

75-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-dashboard-ambari-home.png" alt-text="Screenshot showing select dashboard ambari home.":::
74+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-dashboard-ambari-home.png" alt-text="Screenshot showing select dashboard ambari home.":::
7675

7776
1. Select settings button.
7877

79-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/ambari-dash-board.png" alt-text="Screenshot showing ambari dash board.":::
78+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/ambari-dash-board.png" alt-text="Screenshot showing ambari dash board.":::
8079

8180
1. You will get your latest script run at the top of the list.
8281

83-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/background-operations.png" alt-text="Screenshot showing background operations.":::
82+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/background-operations.png" alt-text="Screenshot showing background operations.":::
8483

8584
1. Verify the script run status in all the nodes individually.
8685

87-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/background-operations-all.png" alt-text="Screenshot showing background operations all.":::
86+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/background-operations-all.png" alt-text="Screenshot showing background operations all.":::
8887

8988
1. Check if the parameter syntax from the parameter syntax section is correct.
9089
1. Check if the log analytics workspace is connected to the cluster and log analytics monitoring is turned on.
9190
1. Check if the script that you run from script action was checked as persisted.
9291

93-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/script-action-persists.png" alt-text="Screenshot showing script action persists.":::
92+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/script-action-persists.png" alt-text="Screenshot showing script action persists.":::
9493

9594
1. It's possible, that a new node has been added to the cluster recently.
96-
> [!NOTE]
97-
> For the script to run in the latest cluster, and the script must persist the script.
95+
96+
> [!NOTE]
97+
> For the script to run in the latest cluster, and the script must persist the script.
98+
9899
1. Make sure all the node types are selected while running the script action.
99100

100-
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-node-types.png" alt-text="Screenshot showing select node types.":::
101+
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/select-node-types.png" alt-text="Screenshot showing select node types.":::
101102

102103
### Scenario 2
103104

@@ -107,7 +108,7 @@ If the script action is showing a Failed status in the script action history
107108
1. Check that the script link is correct.
108109
1. Correct link for the script: https://hdiconfigactions.blob.core.windows.net/log-analytics-patch/selectiveLoggingScripts/selectiveLoggingScript.sh
109110

110-
## Table Names
111+
## Table names
111112

112113
### Spark cluster
113114

@@ -172,10 +173,10 @@ Parameters define the cluster type, table names, source names and the action.
172173

173174
:::image type="content" source="./media/hdinsight-hadoop-oms-selective-log-analytics-tutorial/parameter-syntax-box.png" alt-text="Screenshot showing parameter syntax box.":::
174175

175-
Parameter contains three parts
176-
1. Cluster type
177-
1. Tables and Log types
178-
1. Action (The action can be either `--disable` or `--enable`.)
176+
Parameter contains three parts:
177+
- Cluster type
178+
- Tables and Log types
179+
- Action (The action can be either `--disable` or `--enable`.)
179180

180181
* Multiple tables syntax
181182
Rule: The tables are separated with a (,) or comma.
@@ -187,7 +188,7 @@ For example,
187188
`hbase HDInsightSecurityLogs, HDInsightAmbariSystemMetrics --enable`
188189

189190
> [!NOTE]
190-
>The tables are separated with a comma.
191+
> The tables are separated with a comma.
191192
192193
* Multiple source type/log type
193194
Rule:The source types/log types are separated with a space.
@@ -207,10 +208,10 @@ spark HDInsightSecurityLogs: AmbariAuditLog AuthLog --disable
207208
* Multiple tables and source types
208209
If there are two tables and two source types, which we need to be disabled
209210

210-
1. spark InteractiveHiveMetastoreLog logtype in HDInsightHiveAndLLAPLogs table
211-
1. hbase InteractiveHiveHSILog logtype in HDInsightHiveAndLLAPLogs table
212-
1. hadoop HDInsightHiveAndLLAPMetrics table
213-
1. hadoop HDInsightHiveTezAppStats table
211+
- Spark: InteractiveHiveMetastoreLog logtype in HDInsightHiveAndLLAPLogs table
212+
- Hbase: InteractiveHiveHSILog logtype in HDInsightHiveAndLLAPLogs table
213+
- Hadoop: HDInsightHiveAndLLAPMetrics table
214+
- Hadoop: HDInsightHiveTezAppStats table
214215

215216
Correct Parameter syntax for such cases would be
216217

0 commit comments

Comments
 (0)