This topic mainly describes how to deliver information about events triggered by instances under VolcanoEngine platform accounts to TLS. This helps you perform TLS-based analysis more conveniently.
What is TLS
Torch Log Service (TLS) is a one-stop, log data-targeted service provided by the VolcanoEngine platform. Its capabilities include log collection, massive storage, search and analysis, monitoring and alerts, and data visualization. Its applicable scenarios cover application O&M, service monitoring, and classified protection compliance for comprehensively enhancing R&D and O&M efficiency. Scenario
When you have multiple ECS instances under your VolcanoEngine account, you can deliver information about events triggered during instance operations (such as a "SystemFailure.Redeploy" event) to TLS. This allows you to easily learn operations and conditions of each instance based on TLS features such as massive storage, search and analysis, and data visualization. Therefore, you can improve O&M and analysis efficiency.
Prerequisites
Procedure
Step 1: Create a log project
Event information delivered to TLS is stored as logs, with tenant resources isolated and controlled based on log project. You can create log projects based on your needs. Typically, one log project is created based on a specific application, business, or product.
tip
To reduce network latency, create log projects in a region that is geographically close to your business.
- Select "Log Project Management" in the left navigation pane to enter the log project list page.
- In the top menu bar, select a region close to your business.
- Click the "Create project" button and follow the instructions to enter log topic-related information. For parameter details, see Creating log projects.
- Click the "Confirm" button to complete the creation.
Step 2: Create a log topic
Log topic is classified as the unit for collecting, reading, and writing log data. Based on your needs, you can create multiple log topics under the same log project to differentiate events based on type, business, and other categories.
- Select "Log Project Management" in the left navigation pane to enter the log project list page.
- Click the target log project name to enter the project details page.
- Click the "Create topic" button and enter topic information as instructed. For parameter details, see Creating log topics.
- Click "Confirm" to complete the creation.
Step 3: Configure an index
Before using TLS for search and analysis, you need to configure an index for the log topic.
- Select "Log Project Management" in the left navigation pane to enter the log project list page.
- Click the target log project name to enter the project details page.
- In the "Actions" column of the target log topic, click the "Index configuration" button to enter the index configuration page.
- Configure as shown below.
- Click the "Confirm" button, and in the confirmation pop-up window, click the "Confirm" button to complete the configuration.
Step 4: Create an event rule
To create an event delivery rule, you need to specify the event type to be delivered to TLS and the target log topic. When an instance under your account triggers an event of the specified type, Cloud Monitor automatically delivers the relevant information to TLS in real time.
- In the left navigation pane, select "Event Center > Event Rule" to enter the Event Rule page.
- Click the "Create event rule" button and follow the instructions to configure the event rule. For parameter details, see Creating event rules.
warning
Select "Delivery method > Delivery channel", check "log service", and then click the "Add a delivery topic" button. Next, select the region, project, and log project name of the log topic you created in steps 3 and 4.
- Click the "Confirm" button to complete the rule creation.
View results
After an instance triggers the specified event, you can view the corresponding log information in the TLS console.
tip
For your ECS instances located in different regions under the same VolcanoEngine account, all of their log information of the triggered events is displayed in TLS.
- Select "Log Project Management" in the left navigation pane to enter the log project list page.
- Click the name of the target log project to enter the log project page.
- Select "Query and analysis" in the left navigation pane to enter the search and analysis page.
- In the "Topic" column, select the name of the target log topic.
The topic field is used to specify the data scope to be searched and analyzed. After you select a log topic, there is no need to specify a data scope via the from clause in the search and analysis statement.
The default time range is 5 minutes, and you can also customize the time range to be searched. When the specified time range exceeds the retention period of the log data, the expired and deleted data can not be retrieved.
- Click the "Query and analysis" button to view relevant information.
- In the "Query results" area, basic information about the current log analysis is displayed, including the total number of logs and whether the query results are accurate. For more details, see Analyzing logs.
- To query and analyze event monitoring logs, the following methods are also supported:
- Enter the search and analysis statement in the input box, and analyze the result data statistics that meet the search criteria. For details, refer to Analysis overview.