Basic questions for log collection

Last Updated: Nov 29, 2017

What types of logs does the Log Service collect?

The Log Service supports timestamped text logs encoded in UTF-8 that are generated within the past seven days and are no more than 15 minutes later than the current time.

In what ways does the Log Service collect logs? How do I choose among them?

The Log Service supports direct data writing using APIs (SDKs are currently available in four languages: Java, Python, PHP, and C#). It provides Linux- and Windows-compatible Logtail used to collect real-time updated logs from disk files.

  1. If the logs generated by application programs are not flushed into disk, those logs can be written directly to the Log Service through APIs.
  2. Logs that are written into disks in real time can be collected by Logtail.

How does the Log Service collect logs from ECS?

You can use Logtail to collect the ECS logs that are flushed into disk as follows:

  1. Create a Logstore on the Log Service Console.
  2. Perform Logtail configuration.
  3. Create a machine group.
  4. Execute the installation script to install the Logtail agent.
  5. Apply the Logtail configurations to the machine group.

Does the Log Service collect historical logs?

You can only write data generated during the past seven days using an API. However, Logtail does not support historical data collection for the moment.

What data collection capability does the Log Service provide? Does it have any limitation?

You can adjust the number of shards in a Logstore as needed. Logtail collects data at a maximum rate of 1 MB/s on ECS.

What should I pay attention to when using Logtail to collect logs on NAS?

For collection of Nginx access logs, the Nginx configurations of web servers are the same. Logs are written into files with the same name on different machines. (In this case, Logtail collects logs properly.) When NAS is used, Logtail may have missing logs or encounter a collection error if the Nginx logs on multiple machines are written into the same file on NAS (concurrent write to the same file).To avoid this problem, ensure that the logs on different web servers are written into different files on NAS.

Thank you! We've received your feedback.