The log topic is the basic unit for log management in Torch log service (TLS). Functions such as log collection, query and analysis, and consumption are all performed at the topic level. This topic introduces common management operations for log topics, including how to create, modify, and delete topics.
Prerequisites
A project has been created. For detailed steps, see Log project. Notice
- Up to 200 log topics can be created for each project. To increase the quota, go to Quota Center and apply to raise the parameter total_topics_per_project for quota.
- If the data exceeds read/write capability of the shard, data write may fail. To avoid data write failure, we recommend that you enable automatic shard splitting.
Create topic
- Select the region where log service is located from the top navigation bar.
- On the left navigation bar, select Resource Management > Project .
- On the Project page, find the specified project and click the project name
- In Topic section, click Create topic.
- In the Create topic dialog box, complete the following configurations.
- Fill in the basic configurations
- Configure log storage time.
- TLS supports standard storage, infrequent access storage, and archive storage. For details, see Storage types.
Notice
Logs that exceed specified storage time will be automatically deleted.
- Fill in shard configuration.
- Fill in advanced configuration.
Edit log topic configuration
To modify the topic name, log storage period and other configurations, you can edit log topic. You can also modify them directly in log topic list. Basic settings such as name and description support direct editing. TLS automatically assigns an ID to each log topic. This ID can not be changed.
Tip
- The number of log shards can not be changed currently.
- When auto split is enabled, if the maximum number of splits is less than or equal to the number of log shards, auto-splitting will fail.
- On the top navigation bar, select the region where TLS is located.
- On the left navigation bar, select Resource management > Project.
- Click the specified project name.
- In Topic section, locate the specified log topic and click "..." in the Actions column. And then click Edit.
- You can also directly modify the log topic name and description in the topic list.
- Reset related configurations for the log topic.
Modify log storage time
- On the top navigation bar, select the region where TLS is located.
- On the left navigation bar, select Resource management > Project.
- Click the specified project name.
- In the Topic section, locate the specified log topic and click "..." in the Actions column. And then click Edit.
- You can quickly query the specified log topic by its name, ID, or description.
- Reset the log storage period in Log storage time configuration.
TLS supports batch import of specified log topics and their index configurations across regions and projects.
- On the top navigation bar, select the region where TLS is located.
- On the left navigation bar, select Resource management > Project.
- Click the specified project name.
- In the Topic section, click Import Topic.
- On Topic Import Task page, complete the following configurations, and then click Next step: execute the task.
- Confirm that the log topic import task is complete.
- After confirmation, you can click Finish or click Continue to import collection rules. For instructions on importing collection configurations, see Import Acquisition Configuration .
Delete topic
Warning
- Before deleting a topic, make sure you have removed all related LogCollector collection configurations. For detailed steps to delete a collection configuration, refer to Delete Acquisition Configuration .
- Certain dedicated log topics, such as those related to service logs, can not be deleted.
- After deleting a log topic, all log data and configuration information within it will be permanently deleted and can not be recovered. Proceed with caution.
- On the top navigation bar, select the region where TLS is located.
- On the left navigation bar, select Resource management > Project.
- Click the specified project name.
- In Topic section, locate the specified log topic and click "..." in the Actions column. And then click Delete.
- In the pop-up dialog box, check the information of the topic to be deleted. Enter the topic name in delete confirmation box, and click Delete.
- The dialog box displays resources associated with this topic. If there are linked resources, you can click To delete to remove the relevant resources first.
You can check the usage of a specific log topic within a given time range on the TLS dashboard.
- On the top navigation bar, select the region where TLS is located.
- On the left navigation pane, select Resource management > Project.
- Click the specified project name.
- In the Topics tab on the left navigation pane, click the expand button in front of the specified log topic. Then click Cloud monitoring.
- View resource usage and running state of the current log topic.