Quick Start for Ingesting Linux Hosts to LTS
Quick Start for Ingesting Linux Hosts to LTS
Create log groups and log streams
Log groups and log streams are the basic units for log management in LTS. Before using LTS, create a log group and a log stream.
Install ICAgent
ICAgent is a log collection tool for LTS. It runs on the host where logs are collected. If LTS is used to collect host logs, install ICAgent. If ICAgent has been installed on the host for other cloud services, skip the installation.
Ingest logs to log streams
The following shows how you can ingest host logs to LTS. When ICAgent is installed, configure the paths of host logs that you want to collect in log streams. ICAgent will pack logs and send them to LTS as log streams.
View logs in real time
After log ingestion is configured, you can view the reported logs on the LTS console in real time.
LTS Best Practices
LTS Best Practices
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm-4.png)
Analyzing Huawei Cloud ELB Access Logs for O&M Insights
You can use ELB access logs for auditing or to search for logs by time and keyword. You can also obtain external access statistics by running SQL aggregation queries. For example, you can check the number of requests with 404 responses within a certain day, or analyze statistics on unique visitors (UVs) or page views (PVs) within a particular week.
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm.png)
Analyzing Application Run Logs (in Log4j Format)
Log4j is Apache's open-source project used for logging. We can calculate the number and proportion of logs at different levels, or gather statistics on services from run logs.
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm-3.png)
Connecting to Grafana
Grafana is a cross-platform open-source measurement analysis and visualization tool. It can query collected data, display the data in a visualized manner, and notify users in a timely manner.
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm-1.png)
Using Scripts to Invoke LTS APIs for Custom Operations
Some configuration-related operations on the LTS console, such as ingesting logs, creating alarms, and configuring log transfer, need to be performed repeatedly. However, the LTS console does not support batch operations. In this case, you can use Python scripts and LTS APIs to perform custom batch operations.
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm-5.png)
Collecting Logs of Third-Party Cloud Vendors, Self-built IDCs, and K8s in Other Huawei Cloud Regions to LTS
Learn how to collect Kubernetes logs in multi-cloud or cross-region scenarios.
![](https://res-static.hc-cdn.cn/cloudbu-site/china/zh-cn/yunying/ECS-2023/rm-6.png)
Importing Self-built Elasticsearch Logs to LTS
Learn how to ingest the data of your Elasticsearch on Huawei Cloud to LTS for log storage and analysis.