|
| 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/23/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 | +Users might receive an error message that states "Cannot read properties of undefined (reading length)" when they try to create a custom log table by using a JSON file in Microsoft Azure. This issue typically occurs during the final step of table creation even though the JSON file is valid. If you understand the root cause of the issue and follow the correct steps, you can resolve this issue efficiently. |
| 13 | + |
| 14 | +## Common issues and solutions |
| 15 | + |
| 16 | +- Error: Cannot read properties of undefined (reading length): This error often indicates an issue that affects the JSON structure or the DCR configuration. Doublecheck both for accuracy. |
| 17 | + |
| 18 | +- No Data Ingestion: 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>`. |
| 19 | + |
| 20 | +### Instructions to resolve the issue |
| 21 | + |
| 22 | +1. Make sure that the JSON file that's used is correctly formatted and valid. Use a JSON validator tool to verify this. |
| 23 | + |
| 24 | +2. Create a new data collection rule (DCR): |
| 25 | + 1. Navigate to the Azure portal > **Log Analytics Workspace**. |
| 26 | + 1. Create a DCR specifically for the custom log table. Avoid using an existing DCR that collects other types of data because this action can cause configuration conflicts. |
| 27 | + |
| 28 | +3. Follow the steps that are outlined in the [Azure documentation](/azure/azure-monitor/vm/data-collection-log-json#create-custom-table) to create the custom table by using a PowerShell script. This method allows you to specify the file pattern and verify the DCR configuration after the creation is finished. |
| 29 | + |
| 30 | +4. To be able to perform these actions, make sure that you have at least the Contributor role in the relevant Azure Workspace. |
| 31 | + |
| 32 | +5. If the issue persists, try to refresh the Azure portal to make sure that all settings are updated. |
| 33 | + |
| 34 | +## Reference |
| 35 | + |
| 36 | +- [Create Custom Table in Azure](/azure/azure-monitor/vm/data-collection-log-json#create-custom-table) |
| 37 | +- [Data Collection Rule Best Practices](/azure/azure-monitor/data-collection/data-collection-rule-best-practices) |
| 38 | + |
| 39 | +If the issue persists after you follow these steps, please open a support case for further assistance. |
0 commit comments