ApsaraVideo Live provides log management for you to download logs and configure real-time log delivery.
Log generation rules
-
Log file delay: Logs are typically generated within 24 hours. During peak hours, this delay may exceed 24 hours.
-
You can download log data from the last 30 days.
-
Naming convention:
Accelerated-Domain-Name_Year_Month_Day_StartTime_EndTime.gz. For example:www.example.com_2018_10_30_000000_010000.gz.
[9/Jun/2015:01:58:09 +0800] 188.165.XX.XX - 1542 "-" "GET http://www.aliyundoc.com/index.html" 200 191 2830 MISS "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://example.com/robot/)" "live" 1.1.X.X
The following table describes the log entry fields.
|
Example value |
Description |
|
[9/Jun/2015:01:58:09 +0800] |
Time |
|
188.165.XX.XX |
Client IP address |
|
N/A |
Proxy IP address |
|
1542 |
Response time (in ms) Note
For live streaming requests with periodic logging enabled, this field indicates the time interval between the current and previous log records, not the actual response time of a persistent connection. |
|
N/A |
Referer |
|
GET |
Method |
|
|
Request URL |
|
200 |
HTTP status code |
|
191 |
Request size (in bytes) |
|
2830 |
Response size (in bytes) |
|
MISS |
Cache hit status
|
|
|
User-Agent header |
|
live |
File type |
|
1.1.X.X |
Connection IP address |
Log download
- Log on to the ApsaraVideo Live console.
-
In the left navigation bar, select to go to the Log Management page.
-
Select the domain name and the time range for your query.
-
Click Search to view the logs for the selected domain name and time range.
-
In the Actions column, click Download to save the log file for that time period.
Real-time log delivery
Currently, you can only configure real-time log delivery for streaming domains. To enable real-time log delivery for ingest domains, submit a ticket. For instructions on how to do this, see Contact us.
If you have already activated Log Service and created a Project and a Logstore, you can skip steps 1 and 2.
-
Activate Log Service.
-
Log on to the Log Service console.
-
Follow the on-screen instructions to activate Log Service.
-
-
Create a Project and a Logstore.
-
Log on to the Log Service console.
-
In the Project list, click Create Project.
-
In the Create Project panel, configure the parameters as described in the following table. You can keep the default values for other parameters.
Parameter
Description
Project name
The name of the Project. The name must be globally unique. You cannot change the name after the Project is created.
Region
The region where the Project is located.
You cannot change the region after the Project is created. Log Service does not support cross-region Project migration.
-
Click OK.
-
After you create the Project, the console prompts you to create a Logstore.
-
In the Create Logstore panel, configure the parameters as described in the following table. You can keep the default values for other parameters.
Parameter
Description
Logstore name
The Logstore name, which must be unique within the Project. You cannot change the name after the Logstore is created.
Number of shards
Log Service uses shards to read and write data. Each shard supports a write throughput of 5 MB/s or 500 writes/s, and a read throughput of 10 MB/s or 100 reads/s.
Auto split shard
When enabled, Log Service automatically splits shards if the incoming data volume exceeds their capacity.
If you are sure that the configured number of shards is sufficient for your business needs, you can turn off the Automatic Sharding switch.
-
-
Configure real-time logs.
-
Log on to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose .
-
Click the Real-time Log Delivery tab.
-
Click Create Logging Task.
-
Configure the parameters and click Next.
The Log Retention Period defaults to 7 days, the Number of shards defaults to 2, and the Auto split count defaults to 32. These parameters are read-only and require no manual configuration.
Parameter
Description
Project name
The name of the Log Service Project. The name must be globally unique.
Logstore name
A Logstore is a unit within a Project that collects data from a single source. Log queries, analysis, and delivery are performed per Logstore. If you do not specify a name, the system generates one by default.
Region
The region from which real-time logs are collected. This region must match the Project's region.
Log Service role
You must grant ApsaraVideo Live permission to access Log Service.
-
Associate domain names as required and select the checkbox for the billing statement.
In the Unassociated Domains list, select the target domain names and click the > icon to move them to the Associated Domains area. Then, click Create.
-
Click OK.
-
-
Query and analyze logs.
-
In the Project list, click the target Project.
-
On the tab, click the target Logstore.
-
Enter a query or analysis statement, select a time range, and then click Search & Analyze.
For more information about query and analysis statements, see Query overview and Query and analysis overview.
-
Next steps
To view or modify the domain names associated with a real-time log delivery task, use the options in the Actions column for that task.
|
Function |
Description |
|
View |
View the domain names associated with the specified real-time log delivery task. |
|
Modify domain name |
Modify the domain names associated with the specified real-time log delivery task. |
|
Migrate domain name |
Migrate a domain name from Logstore1 to Logstore2. During migration, data continues to be delivered to Logstore1. After the migration completes, data is delivered to Logstore2 without interruption. |
|
Suspend service |
Suspend the specified real-time log delivery task. |
|
More |
|