Migrate from Data Collector API and custom fields-enabled tables to DCR-based custom log collection
This article describes how to migrate from Data Collector API or custom fields in Azure Monitor to DCR-based custom log collection. It includes configuration required for custom tables created in your Log Analytics workspace so that they can be used by Logs ingestion API and workspace transformations.
You do not need to follow this article if you are configuring your DCR-based custom logs using the Azure Portal since the configuration will be performed for you. This article only applies if you're configuring using Resource Manager templates APIs.
To use a table with the Logs ingestion API or with a workspace transformation, it must be configured to support new features. When you complete the process described in this article, the following actions are taken:
- The table is reconfigured to enable all DCR-based custom logs features. This includes DCR and DCE support and management with the new Tables control plane.
- Any previously defined custom fields will stop populating.
- The Data Collector API will continue to work but won't create any new columns. Data will only populate into any columns that was created prior to migration.
- The schema and historic data is preserved and can be accessed the same way it was previously.
This article is only applicable if all of the following criteria apply:
- You're going to send data to the table using the Logs ingestion API or configure a transformation for the table in the workspace transformation DCR, preserving both schema and historical data in that table.
- The table was either created using the Data Collector API, or has custom fields defined in it.
- You want to migrate using the APIs instead of the Azure portal as described in Send custom logs to Azure Monitor Logs using the Azure portal or Add transformation in workspace data collection rule using the Azure portal.
If all of these conditions aren't true, then you can use DCR-based log collection without following the procedure described here.
If the table that you're targeting with DCR-based log collection fits the criteria above, then you must perform the following steps:
Configure your data collection rule (DCR) following procedures at Send custom logs to Azure Monitor Logs using Resource Manager templates or Add transformation in workspace data collection rule to Azure Monitor using resource manager templates.
If using the Logs ingestion API, also configure the data collection endpoint (DCE) and the agent or component that will be sending data to the API.
Issue the following API call against your table. This call is idempotent, so there will be no effect if the table has already been migrated.
Discontinue use of the Data Collector API and start using the new Logs ingestion API.