- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
-
User Guide
- Granting LTS Permissions to IAM Users
- Purchasing LTS Resource Packages
- Log Management
-
Log Ingestion
- Overview
-
Using ICAgent to Collect Logs
- Overview
- Installing ICAgent (Intra-Region Hosts)
- Installing ICAgent (Extra-Region Hosts)
- Managing ICAgent
- Managing Host Groups
- Ingesting BMS Text Logs to LTS
- Ingesting CCE Application Logs to LTS
- Ingesting ECS Text Logs to LTS
- Ingesting ServiceStage Containerized Application Logs to LTS
- Ingesting ServiceStage Cloud Host Logs to LTS
- Ingesting Self-Built Kubernetes Application Logs to LTS
- Setting ICAgent Structuring Parsing Rules
-
Ingesting Cloud Service Logs to LTS
- Overview
- Ingesting AOM Logs to LTS
- Ingesting APIG Logs to LTS
- Ingesting CBH Logs to LTS
- Ingesting CFW Logs to LTS
- Ingesting CTS Logs to LTS
- Ingesting DDS Logs to LTS
- Ingesting DMS for Kafka Logs to LTS
- Ingesting DRS Logs to LTS
- Ingesting GaussDB(DWS) Logs to LTS
- Ingesting ELB Logs to LTS
- Ingesting Enterprise Router Logs to LTS
- Ingesting FunctionGraph Logs to LTS
- Ingesting GaussDB Logs to LTS
- Ingesting GES Logs to LTS
- Ingesting TaurusDB Logs to LTS
- Ingesting GeminiDB Logs to LTS
- Ingesting GeminiDB Mongo Logs to LTS
- Ingesting GeminiDB Cassandra Logs to LTS
- Ingesting IoTDA Logs to LTS
- Ingesting ModelArts Logs to LTS
- Ingesting MRS Logs to LTS
- Ingesting RDS for MySQL Logs to LTS
- Ingesting RDS for PostgreSQL Logs to LTS
- Ingesting RDS for SQL Server Logs to LTS
- Ingesting ROMA Connect Logs to LTS
- Ingesting SMN Logs to LTS
- Ingesting SecMaster Logs to LTS
- Ingesting OBS Files to LTS (Beta)
- Ingesting VPC Logs to LTS
- Ingesting WAF Logs to LTS
- Using APIs to Ingest Logs to LTS
- Ingesting Logs to LTS Across IAM Accounts
- Using Kafka to Report Logs to LTS
- Using Flume to Report Logs to LTS
- Log Search and Analysis
-
Log Visualization
- Overview
- Visualizing Logs in Statistical Charts
-
Visualizing Logs in Dashboards
- Creating a Dashboard
- Adding a Dashboard Filter
-
Dashboard Templates
- APIG Dashboard Templates
- CCE Dashboard Templates
- CDN Dashboard Templates
- CFW Dashboard Templates
- CSE Dashboard Templates
- DCS Dashboard Template
- DDS Dashboard Template
- DMS Dashboard Template
- DSL Dashboard Template
- ER Dashboard Template
- METRIC Dashboard Template
- Nginx Dashboard Templates
- VPC Dashboard Template
- WAF Dashboard Templates
- Log Alarms
- Log Transfer
- Log Processing
- Configuration Center
- Querying Real-Time LTS Traces
-
Best Practices
- Overview
-
Log Ingestion
- Collecting Logs from Third-Party Cloud Vendors, Internet Data Centers, and Other Huawei Cloud Regions to LTS
- Collecting Kubernetes Logs from Third-Party Clouds, IDCs, and Other Huawei Cloud Regions to LTS
- Collecting Syslog Aggregation Server Logs to LTS
- Importing Logs of Self-built ELK to LTS
- Using Flume to Report Logs to LTS
- Collecting Zabbix Data Through ECS Log Ingestion
- Collecting Logs from Multiple Channels to LTS
- Log Search and Analysis
- Log Transfer
- Billing
- Developer Guide
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- API Calling Examples
- Examples
-
APIs
- Host Group Management
- Log Group Management
- Log Stream Management
- Log Management
- Log Ingestion
- Log Transfer
- Log Collection Beyond Free Quota
- Cloud Log Structuring
- Container Log Ingestion from AOM to LTS
- Alarm Topics
- Message Template Management
- SQL Alarm Rules
- Keyword Alarm Rules
- Alarm List
- Tag Management
- Dashboard Management
- Log Charts
- Quick Search
- Multi-Account Log Aggregation
- Permissions Policies and Supported Actions
- Appendix
- SDK Reference
-
FAQs
- Overview
- Consultation
- Log Management
-
Host Management
- What Do I Do If ICAgent Installation Fails in Windows and the Message "SERVICE STOP" Is Displayed?
- What Do I Do If ICAgent Upgrade Fails on the LTS Console?
- What Do I Do If I Could Not Query New Logs on LTS?
- What Do I Do If ICAgent Restarts Repeatedly After Being Installed?
- What Do I Do If ICAgent Is Displayed as Offline on the LTS Console After Installation?
- What Do I Do If I Do Not See a Host with ICAgent Installed on the LTS Console?
- How Do I Create a VPC Endpoint on the VPCEP Console?
- How Do I Obtain an AK/SK Pair?
- How Do I Install ICAgent by Creating an Agency?
-
Log Ingestion
- What Do I Do If LTS Cannot Collect Logs After I Configure Host Log Ingestion?
- Will LTS Stop Collecting Logs After the Free Quota Is Used Up If I Disable "Continue to Collect Logs When the Free Quota Is Exceeded" in AOM?
- What Do I Do If the CPU Usage Is High When ICAgent Is Collecting Logs?
- What Kinds of Logs and Files Does LTS Collect?
- How Do I Disable the Function of Collecting CCE Standard Output Logs to AOM on the LTS Console?
- What Log Rotation Scheme Should I Use for ICAgent to Collect Logs?
- Does LTS Use the Log4j Plug-in to Report Logs?
- How Long Does It Take to Generate Logs After Configuring Log Ingestion?
- What Do I Do If LTS Cannot Collect Logs After I Configure Log Ingestion with ICAgent?
- Log Search and Analysis
-
Log Transfer
- Does LTS Delete Logs That Have Been Transferred to OBS Buckets?
- What Are the Common Causes of LTS Log Transfer Abnormalities?
- How Do I Transfer CTS Logs to an OBS Bucket?
- What Do I Do If I Cannot View Historical Data in an OBS Bucket After Transferring Data from LTS to OBS?
- What Do I Do If I Cannot Find a New Partition in a DLI Table After Logs Are Transferred to DLI?
-
More Documents
- User Guide (ME-Abu Dhabi Region)
- API Reference (ME-Abu Dhabi Region)
- User Guide(Paris Regions)
- API Reference(Paris Regions)
- User Guide (Kuala Lumpur Region)
- API Reference (Kuala Lumpur Region)
- User Guide (Ankara Region)
-
API Reference (Ankara Region)
- Before You Start
- Calling APIs
- API Calling Examples
- APIs
- Permissions and Supported Actions
- Appendix
- Change History
- Videos
- General Reference
Copied.
Generating Metrics from Logs (Beta)
You can create log metric rules to extract log data reported to LTS as metrics and view them on the metric browsing and dashboard pages of the AOM console.
Currently, this function is in closed beta testing. It is available to whitelisted users in regions CN North-Beijing4 and CN North-Ulanqab1, and will be available to all users in all regions later.
Background
- You can create metric rules on the LTS console to generate statistical reports as required. You can also set a single log filter or add associations and groups to set multiple log filters to retain logs that meet the filters. Statistics on the structured logs within a specified time range can be collected dynamically and displayed on the Prometheus instances of AOM, which is easy to operate and powerful.
- Each metric rule can generate only one result. To obtain multiple results, you need to create multiple metric rules.
Prerequisites
- A Prometheus instance has been created on the AOM console.
- Logs have been ingested to LTS.
- Log data has been structured. Currently, only structured log data can be used to generate metrics.
NOTE:
To generate metrics based on logs, the log time sequence deviation must be within a small range (5s if Frequency is set to 5s, 1 minute if Frequency is set to 1 min, and 1 minute and 30 seconds if Frequency is set to 5 min). It is recommended that ICAgent be used to report logs in structured mode. If cloud structuring parsing is used, the log time may be out of order. As a result, logs cannot be processed within the statistical period and the statistical result is inaccurate.
Constraints
A single user can create a maximum of 10 log metric rules. The total number of metrics added to all rules cannot exceed 10.
Creating a Log Metric Rule
- Log in to the LTS console.
- Log in to the LTS console and choose Log Jobs in the navigation pane.
- On the Metric Generation tab page, click Create Rule.
- Configure basic log information.
- Enter a rule name. A rule name can contain a maximum of 256 characters, including letters, digits, underscores (_), and hyphens (-).
- Enter the description information.
- Retain the default setting of Status (enabled).
- Agency Authorization is enabled by default. To create a log metric generation task, authorize LTS and AOM to create cloud service agencies lts_admin_trust and aom_admin_trust.
- Enable Task Monitoring so that the execution status of each task is written to the log stream lts-system/lts-logtometric-statistics. You can view the monitoring center for metric generation tasks or configure alarm rules to detect exceptions that occur during processing in a timely manner.
- Configure the data source.
- Select a source log group. If no group is available, click Create Log Group.
NOTE:
- The logs that exceed the retention period will be automatically deleted. You can transfer logs to OBS buckets for long-term storage.
- If your logs have not been ingested to LTS, create a log ingestion rule by referring to Log Ingestion and configure a log structuring parsing rule.
- Select a source log stream. If no stream is available, click Create Log Stream.
- Enable Log Sampling. This function randomly samples the log source at a rate ranging from 0.1 to 0.9.
- Select a source log group. If no group is available, click Create Log Group.
- Configure the metric storage location.
- Metrics generated from logs will be stored in AOM as user-defined metrics. Select the Prometheus instance where the metrics are to be stored. If no instance is available, click Create an instance.
- Customize a name for the log generation metric. The value can contain only letters, digits, underscores (_), and colons (:), and cannot start with a digit, underscore (_), or colon (:).
- Enter metric description.
- Click Next.
- Preview the information below Metric Preview. This simulates the metrics generated by executing SQL queries on log streams using the configured log filtering and statistics rules. To do so, you must first collect logs to LTS and configure structuring parsing rules and indexes. Otherwise, the preview is empty.
- Implement statistical settings.
- Set a log filtering rule. Then you can preview the effect. If you cannot find the desired log fields in the Log Filtering and Log Statistics areas, configure them in the collection settings first by referring to Setting Cloud Structuring Parsing.
NOTE:
- You can filter logs using OR and AND conditions.
- Different fields support different filtering rules.
- The log filtering and statistics fields must be string, float, or long types, not json.
- Log filtering is to reserve the logs that meet the conditions and discard the logs that do not meet the conditions.
- The group by function must be string or integer types.
- Select or customize the field to count and specify Group by. The data collected one minute later than the allowed period will not be counted.
NOTE:
- The following statistics types are supported:
count: number of logs. countKeyword: number of times a keyword appears. sum: sum value of a specified field. avg: average value of a specified field. max: maximum value of a specified field. min: minimum value of a specified field. P50: the value below which 50% of the data falls. P75: the value below which 75% of the data falls. P90: the value below which 90% of the data falls. P95: the value below which 95% of the data falls. P99: the value below which 99% of the data falls.
- For the P-series statistical type, the numbers are sorted and the value of xx% is used as the statistical result.
- Log statistics are performed on logs that meet the conditions. During the execution, a log stream is generated in log group system. If the log stream is deleted, the execution details of all metric generation rules cannot be viewed.
- The following statistics types are supported:
- Set the frequency. Options: 5s, 1 min, or 5 min. The frequency not only represents the data reporting interval, but also represents the time window of the statistics operation. For example, 5 min means that after a 5-minute interval is reached, the data of the previous 5 minutes is collected and reported.
- After the setting is complete, the dimension is automatically generated based on the content selected in the query.
- Select a unit. For example, select a unit for angle, bandwidth, or frequency.
- Set a log filtering rule. Then you can preview the effect. If you cannot find the desired log fields in the Log Filtering and Log Statistics areas, configure them in the collection settings first by referring to Setting Cloud Structuring Parsing.
- (Optional) Click Real-Time Log Preview to view real-time logs.
- Click OK.
- View the new rule on the Metric Generation tab page.
NOTE:
- Metric visualization and alarm reporting: After a metric is created, you can go to the AOM console to configure a visualized metric chart on the Dashboard page or metric alarms on the Alarm Rules page.
- You are advised to configure a maximum of five rules for each log stream.
- You can click the buttons in the Operation column of the rule list to copy, modify, or delete a rule.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot