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: support/azure/azure-monitor/log-analytics/configure-and-manage-log-analytics-tables/troubleshoot-custom-log-table-creation.md
When attempting to create a custom log table using a JSON file in Azure, users may encounter an error stating "Cannot read properties of undefined (reading length)". This issue typically arises during the final step of table creation, despite the JSON being valid. Understanding the root cause and following the correct steps can help resolve this problem.
13
13
14
-
## Step-by-Step Instructions to Resolve the Issue
15
-
16
-
### 1. Verify JSON Validity
17
-
18
-
- Ensure that the JSON file being used is correctly formatted and valid. Use a JSON validator tool to confirm this.
19
-
20
-
### 2. Create a New Data Collection Rule (DCR)
21
-
22
-
- Navigate to the Azure portal and access the **Log Analytics Workspace**.
23
-
- Create a new DCR specifically for the custom log table. Avoid using an existing DCR that collects other types of data, as this can lead to configuration conflicts.
24
-
25
-
### 3. Use PowerShell Script for Table Creation
14
+
## Common Issues and Solutions
26
15
27
-
-Follow the steps outlined in the [Azure documentation](https://learn.microsoft.com/azure/azure-monitor/vm/data-collection-log-json#create-custom-table) to create the custom table using a PowerShell script.
28
-
- This method allows you to specify the file pattern and verify the DCR configuration after creation.
16
+
-**Error: Cannot read properties of undefined (reading length)**
17
+
- This error often indicates a problem with the JSON structure or the DCR configuration. Double-check both for accuracy.
29
18
30
-
### 4. Check Contributor Role
19
+
-**No Data Ingestion**
20
+
- Verify that the data source is correctly set up to collect log files. The data source type should be **Custom (Log files)**, and the stream declaration should follow the format `Custom-<TableName>`.
31
21
32
-
- Ensure that you have at least the Contributor role in the relevant Azure Workspace to perform these actions.
22
+
### Step-by-Step Instructions to Resolve the Issue
33
23
34
-
### 5. Refresh the Portal
24
+
1.**Verify JSON Validity**
25
+
- Ensure that the JSON file being used is correctly formatted and valid. Use a JSON validator tool to confirm this.
35
26
36
-
- If issues persist, try refreshing the Azure portal to ensure all settings are updated.
27
+
2.**Create a New Data Collection Rule (DCR)**
28
+
- Navigate to the Azure portal and access the **Log Analytics Workspace**.
29
+
- Create a new DCR specifically for the custom log table. Avoid using an existing DCR that collects other types of data, as this can lead to configuration conflicts.
37
30
38
-
## Common Issues and Solutions
31
+
3.**Use PowerShell Script for Table Creation**
32
+
- Follow the steps outlined in the [Azure documentation](https://learn.microsoft.com/azure/azure-monitor/vm/data-collection-log-json#create-custom-table) to create the custom table using a PowerShell script.
33
+
- This method allows you to specify the file pattern and verify the DCR configuration after creation.
39
34
40
-
-**Error: Cannot read properties of undefined (reading length)**
41
-
- This error often indicates a problem with the JSON structure or the DCR configuration. Double-check both for accuracy.
35
+
4.**Check Contributor Role**
36
+
- Ensure that you have at least the Contributor role in the relevant Azure Workspace to perform these actions.
42
37
43
-
-**No Data Ingestion**
44
-
- Verify that the data source is correctly set up to collect log files. The data source type should be **Custom (Log files)**, and the stream declaration should follow the format `Custom-<TableName>`.
38
+
5.**Refresh the Portal**
39
+
- If issues persist, try refreshing the Azure portal to ensure all settings are updated.
0 commit comments