Log Service allows you to download logs or query and analysis results to your on-premises machine. This topic describes how to download logs.
Download methods
Item | Log Service console | Log Service CLI on your on-premises machine | Cloud Shell | Log Service SDK |
---|---|---|---|---|
Maximum amount of data that can be downloaded |
|
Unlimited | 1 million | Unlimited |
Deployment | N/A | Manual installation | Automatic deployment | Manual deployment |
Key | N/A | Manual configuration | Automatic configuration | Manual configuration |
Download over LAN (no traffic over the Internet and no fees for the traffic) | N/A | Supported (Log Service CLI must be deployed on an Elastic Compute Service (ECS) instance in the region of the Log Service project from which you want to download data.) | Supported only in the China (Shanghai) region | Supported (Log Service SDKs must be deployed on an ECS instance in the region of the Log Service project from which you want to download data.) |
Integration with Apsara File Storage NAS | N/A | Manual configuration | Automatic configuration | Manual configuration |
Download logs in the Log Service console
You can download logs or query and analysis results from the Log Service console to your on-premises machine by performing similar operations. In this topic, logs are used to show the download procedure. If you want to download query and analysis results, you can click Download Log on the Graph tab after you execute a query statement.
- You can download up to 1 million logs at a time. If the limit is exceeded, only the first 1 million logs are downloaded. If you want to download more than 1 million logs, you can reduce the time range of query and repeat the download operations.
- You can download up to 100,000 rows of analysis results at a time. If the limit is exceeded, only the first 100,000 rows of analysis results are downloaded. If you want to download more than 100,000 rows of analysis results, you can reduce the time range of query and repeat the download operations.
- Log Service allows for up to three concurrent download operations within each Alibaba Cloud account. Log Service does not limit the total number of download operations. If more than three download operations are concurrently performed or multiple RAM users are used to download logs at the same time, an error may be reported. In this case, you must wait until other download operations are complete and try again.
- Log Service stores the export records of only the previous day and deletes export records after one day.
Use Cloud Shell to download logs
You can use Cloud Shell to download logs. For more information, see Use Cloud Shell to download logs from Log Service.
Use Log Service CLI to download logs
If you want to download a large number of logs, you can use Log Service CLI. For more information, see Overview of Log Service CLI.
- When you use Log Service CLI to download logs, you must specify your AccessKey pair in commands. If you want to use an Alibaba Cloud account to download logs, you can obtain the AccessKey pair of the Alibaba Cloud account in the User Management console. If you want to use a RAM user to download logs, you must create a RAM user in the RAM console and specify the AccessKey pair of the RAM user in commands.
- If the Log Service CLI server resides in the same region as the current Log Service project, we recommend that you click Switch to Internal Endpoint. This way, logs can be downloaded faster, and you are not charged for Internet traffic because data is not transferred over the Internet.
Use a Log Service SDK to download logs
If you want to download a large number of logs, you can use a Log Service SDK. For more information, see Overview.