|
| 1 | +--- |
| 2 | +title: Troubleshoot Custom Log Table Creation in Azure |
| 3 | +description: Troubleshooting guide for custom log table creation in Azure. |
| 4 | +ms.date: 07/16/2025 |
| 5 | +ms.reviewer: v-liuamson; v-gsitser |
| 6 | +ms.service: azure-monitor |
| 7 | +ms.custom: Configure and Manage Log analytics tables |
| 8 | +--- |
| 9 | + |
| 10 | +# Troubleshoot Custom Log Table Creation in Azure |
| 11 | + |
| 12 | +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 | + |
| 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 |
| 26 | + |
| 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. |
| 29 | + |
| 30 | +### 4. Check Contributor Role |
| 31 | + |
| 32 | +- Ensure that you have at least the Contributor role in the relevant Azure Workspace to perform these actions. |
| 33 | + |
| 34 | +### 5. Refresh the Portal |
| 35 | + |
| 36 | +- If issues persist, try refreshing the Azure portal to ensure all settings are updated. |
| 37 | + |
| 38 | +## Common Issues and Solutions |
| 39 | + |
| 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. |
| 42 | + |
| 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>`. |
| 45 | + |
| 46 | +## Reference |
| 47 | + |
| 48 | +- [Create Custom Table in Azure](https://learn.microsoft.com/azure/azure-monitor/vm/data-collection-log-json#create-custom-table) |
| 49 | +- [Data Collection Rule Best Practices](https://learn.microsoft.com/azure/azure-monitor/data-collection/data-collection-rule-best-practices) |
| 50 | + |
| 51 | +If the issue persists after following the solution steps, please open a support case for further assistance. |
0 commit comments