Log Indexes¶
The system automatically archives log data into corresponding indexes based on set filter conditions. By creating multiple log indexes, you can:
- Isolate log data by business line, environment, or project
- Configure differentiated storage policies for different indexes
- Optimize query performance and reduce scanning of irrelevant data
Note
❗️ By default, log indexes cannot be created. Please contact your account manager to apply for activation of this feature.
Create¶
- Navigate to the Create > Log Index page.
- Customize the index name.
- Add a description as needed.
- Add filter conditions.
-
Configure the data storage policy: Select the log retention period, after which data is automatically cleaned up.
- Deployment Plan users can customize the storage duration, range: 1d ~ 1,800d.
-
Configure advanced options as needed.
- Confirm.
Filter Conditions¶
Filter conditions define the rules for logs to enter the current index. Two configuration modes are currently supported: Basic Match and Advanced Match.
Basic Match¶
Basic Match follows the original configuration method and is suitable for scenarios with simpler filtering logic.
-
Select the condition relationship:
- Meet all conditions: Logs must satisfy all filter conditions simultaneously to enter the current index.
- Meet any condition: Logs can enter the current index if they satisfy any one of the filter conditions.
-
Add filter conditions:
- Field Name: Select a log field, such as
source,service,host, etc. - Operator: Select the matching method.
- Match Value: Enter the field value. Separate multiple values with English commas.
- Field Name: Select a log field, such as
Basic Match is suitable for quickly configuring index routing based on fixed fields.
Advanced Match¶
Advanced Match is suitable for scenarios requiring more flexible combination of matching rules. After enabling Advanced Match, log data will enter a Pipeline for matching judgment, and corresponding charges will apply.
In Advanced Match, you can configure multiple filter conditions. Each condition includes:
- Field Name: Enter the log field to be evaluated.
- Matching Method: Supports
=,!=,in,not in,match,not match,wildcard,not wildcard. - Match Value: Enter the corresponding match value for the field.
Click Add Filter to continue adding conditions. Click Clear All Conditions to remove all currently configured conditions.
An Expression Preview is displayed at the bottom of the page to confirm the final matching expression generated by the current filter conditions. If the conditions are incomplete or the expression is invalid, the page will prompt "Please complete or correct the filter conditions". In this case, you need to supplement the field name, matching method, or match value before saving.
Note
Logs are matched in the order of the index list and will only enter the first matching index. The same log will not enter multiple indexes repeatedly.
Advanced Options (Optional)¶
Full-text Index Fields¶
-
Only
messageindex field (default): Full-text search only matches within the originalmessagefield content. In this mode, the system retains the original log content. -
Full-line index: Full-text search matches across all business fields, excluding system fields. After selecting this mode, the system no longer saves the original
messagefield. Extracted business fields will be written to variant for retrieval (❗️ When switching to "Full-line index", please ensure the field parsing rules are complete. Missing parsing rules may prevent log content from being retrieved normally).
What is Full-line Index
When "Full-line index" is selected, it means that all user-defined, important business fields in a record are packaged into a semi-structured data object and stored in a special column. This packaging process excludes system fields automatically generated by the database.
Then, the system creates a global index for this column containing all business data. In subsequent usage scenarios (e.g., Explorer search), users can perform full-text searches without specifying fields. By entering a keyword, they can match records containing that keyword across all business fields.
Matching Services¶
Used to associate APM data with application logs.
- Input rules: Supports wildcard fuzzy matching (e.g.,
service*). Separate multiple values with English commas. - Scope: When viewing related logs on the APM > Details page, the system prioritizes matching logs from the index corresponding to the service.
Configuration example:
payment*: Matches all services starting withpaymentorder-service,user-service: Exactly matches the two specified services
Index Limits¶
| Limit Item | Description |
|---|---|
| Total Limit | 6 (including the default index), meaning a maximum of 5 custom indexes can be created. |
| Matching Mechanism | Sequential matching. The first matching index takes effect, and subsequent indexes are not matched. |
| Storage Duration | Deployment Plan supports 1d ~ 1,800d. For SaaS Plan, refer to the selectable range on the page. |
