TLS supports TOS data import, allowing you to structure the data stored in TOS and save it in TLS. This topic describes the steps to import data from TOS to TLS.
Background information
For bulk import of large volumes of log files, you can do the following: upload log files to a TOS bucket; use TLS's log import feature to structure; import, and save files in TLS. Then you can perform real-time query analysis and further processing to log data. When importing data from TOS, you can import all data from one or more objects in a specified bucket into TLS. Cross-region import is supported, meaning the TLS topic and source bucket can be located in different regions. After creating an import task, you can view the progress and status in TLS console, or use service log analysis for detailed progress and status data.
TLS also adds the following metadata fields to imported log data.
Notice
The following are the limitations of the data import feature from TOS:
Billing description
Prerequisites
- Log files have been uploaded to a TOS bucket. For detailed steps, see Upload logs.
- A log project and log topic are created. For detailed steps, see Create resources.
- Before using the log import or log shipping features for the first time, you must complete cloud resource access authorization to grant TLS permission to access and write resources. If authorization has not yet been granted, TLS will provide guidance when you create a log import task in the console. We recommend using the Volcanoengine primary account for authorization. For more information, see Cross-service access authorization.
Steps
Step 1 Select a log space
- Select the region where log service is located from the top navigation bar.
- On the left navigation bar, select Common functions > Log Collection.
- . On the Data import tab, click Volcano Engine TOS.
- Select a log space, then click Next step: configure import rules.
Step 2 Configure import rules
- Set the name for the log import task.
- Configure the data source.
- Configure the import method.
- If log extraction type is set to multi-line, you also need to configure the following additional parameters:
- If log extraction type is set to CSV, you also need to configure the following additional parameters:
- Click Execution preview to view the content of the file to be imported.
- After configuring the import rules, TLS provides data preview from the specified data source so you can check whether the data in the preview area matches the data to be imported. If the data is different, it means the data source configuration is incorrect. We recommend reconfiguring it.
- Click Next step: check index configuration.
Step 3 Check index configuration
- Check index configuration.
- Follow the prompts on the page to set or update the index as needed. You can also click Import existing index configuration to import indexes from other log topics.
- If this log topic does not have an index configured, you can set one. For details, see Configure indexes.
- If the index for this log topic is already configured, you can decide whether to update the index based on the log fields parsed by the collection rule.
Notice
- You must enable the index to query and analyze the collected log data.
- The updated index settings only apply to new data written afterward. For more instructions and limitations on query and analysis, see Query overview and Analysis overview.
- Click Next step: check index configuration.
Error handling mechanism
Related operations
After successfully creating the TOS data import task, you can view relevant information in the TLS console, including configuration details of the import setup and the progress of data import.
View configuration details
- Select the region where log service is located from the top navigation bar.
- On the left navigation bar, select Common functions > Log Collection.
- Then on the Data import tab under Task list, click the log import task name.
- On the Configuration details tab, view the task's configuration information.
- You can view the basic information, data source configuration, and log extraction mode for the import task.
View import progress
The Import task information tab displays the status and progress of the import task in detail as follows:
Import task status description:
TLS supports copying data import tasks. If a similar data import task exists, you can copy all the configurations from an existing task, and then adjust the settings as needed to create a new data import task.
- Select the region where log service is located from the top navigation bar.
- On the left navigation bar, select Common functions > Log Collection.
- In the Data import tab under the Task list section, click Copy under the Actions column for the task to be copied.
- Refer to the steps for creating an import task to confirm or modify the relevant parameter settings.
Delete imported tasks
If there is a failure or anomaly with a data import task, you can delete the task and re-import data. If you have finished migrating historical log data, or no longer need to import logs to TLS, you can follow the steps below to delete log import tasks.
Notice
- Deleting a log import task does not affect logs that have already been imported successfully.
- A deleted log import task can not be restored. Proceed with caution.
- Select the region where torch log service is located from the top navigation bar.
- On the left navigation bar, select Common functions > Log Collection.
- In the task list section under data import tab, locate the log import task you need to delete, and click Delete in its Actions column.
- Confirm the information for the task to be deleted in the popup dialog, and then click Confirm.