- 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.
Creating a Log Transfer Task
Function
This API is used to transfer logs of one or more specified log streams to Object Storage Service (OBS).
URI
POST /v2/{project_id}/log-dump/obs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
ID. For details about how to obtain the ID, see Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID. Default value: None Value length: 32 characters |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. Default value: None Minimum length: 1000 characters Maximum length: 2000 characters |
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=UTF-8. Default value: None Minimum length: 30 characters Maximum length: 30 characters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
log_group_id |
Yes |
String |
Log group ID. Value length: 36 characters |
log_stream_ids |
Yes |
Array of strings |
Indicates IDs of log streams whose logs are to be periodically transferred to OBS. You can specify one or more log streams. Example value:
|
obs_bucket_name |
Yes |
String |
Indicates the name of an OBS bucket. Minimum length: 3 characters Maximum length: 63 characters |
type |
Yes |
String |
Set this parameter to cycle, which indicates that the log transfer is periodic. Value length: 5 characters |
storage_format |
String |
Indicates whether the logs are stored in raw or JSON format. The default value is RAW. Minimum length: 3 characters Maximum length: 4 characters |
|
switch_on |
No |
Boolean |
Indicates whether the log transfer is enabled. The value is true (default) or false. |
prefix_name |
No |
String |
Indicates the file name prefix of the log files transferred to an OBS bucket. Minimum length: 0 characters Maximum length: 64 characters |
dir_prefix_name |
No |
String |
Indicates a custom path to store the log files. Minimum length: 0 characters Maximum length: 64 characters |
period |
Yes |
Integer |
Indicates the length of the log transfer interval. Example values: 1, 2, 3, 5, 6, 12, and 30 |
period_unit |
Yes |
String |
Indicates the unit of the log transfer interval. Example values: min and hour Minimum length: 3 characters Maximum length: 4 characters The log transfer interval is specified by the combination of the values of period and period_unit, and must be set to one of the following: 2 min, 5 min, 30 min, 1 hour, 3 hours, 6 hours, and 12 hours. |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
log_dump_obs_id |
String |
Transfer task ID. Default value: None Value length: 36 characters |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Example value:
|
error_msg |
String |
Error message. Example value:
|
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Example value: |
error_msg |
String |
Error message. Example value:
|
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. Example value: |
error_msg |
String |
Error message. Example value: |
Example Request
POST https://{endpoint}/v2/{project_id}/log-dump/obs /v2/{project_id}/log-dump/obs { "log_group_id": "d9dba9f3-xxxx-48bd-xxxx-xxxxa24a8053", "log_stream_ids": "45e7f609-xxxx-4cd3-835b-xxxx4a124718", "obs_bucket_name": "lts-test", "type": "cycle", "storage_format": "RAW", "switch_on": "true", "prefix_name": "fileprefixname", "dir_prefix_name": "dirprefixname", "period": 5, "period_unit": "min" }
Example Response
Status code: 200
- The log group does not exist.
{ "error_code": "LTS.0201", "error_msg": "The log group does not existed" }
- The log stream does not exist.
{ "error_code": "LTS.0208", "error_msg": "Log stream id does not exist: 632b9bdc-5afd-4666-a5de-2579f8b80314-" }
- The OBS bucket does not exist.
{ "error_code": "LTS.0416", "error_msg": "obs bucket does not exist: zhuanchu" }
- The log stream ID has been associated with a transfer task.
{ "error_code": "LTS.0207", "error_msg": "Log stream id is associated by transfer: 632b9bdc-5afd-4666-a5de-2579f8b80314" }
- Invalid transfer type.
{ "error_code": "LTS.1901", "error_msg": "type is not in the list [cycle]" }
- Invalid storage format.
{ "error_code": "LTS.1901", "error_msg": "storage_format is not in the list [RAW, JSON]" }
- Invalid log transfer interval.
{ "error_code": "LTS.1901", "error_msg": "period+period_unit is not in the list [2min, 5min, 30min, 1hour, 3hour, 6hour, 12hour]" }
- Invalid unit of the log transfer interval.
{ "error_code": "LTS.1901", "error_msg": "period_unit is not in the list [min, hour]" }
- Invalid file name prefix.
{ "error_code": "LTS.1902", "error_msg": "prefix_name is invalid, please verify if it's provided as required" }
- Invalid custom path to store log files.
{ "error_code": "LTS.1902", "error_msg": "dir_prefix_name is invalid, please verify if it's provided as required" }
Status code: 201
{ "log_dump_obs_id" : "45fdc36b-xxxx-4567-xxxx-559xxxxdf968" }
Status code: 400
- The request is invalid. Modify the request based on the description in error_msg before a retry.
{ "error_code" : "LTS.0009", "error_msg" : "Failed to validate the request body" }
- The request is invalid. Modify the request based on the description in error_msg before a retry.
{ "error_code": "LTS.0007", "error_msg": "The request body format must be json" }
Status code: 403
The server understood the request but refused to authorize it. The client should not repeat the request without modifications.
{ "error_code" : "LTS.0001", "error_msg" : "Invalid projectId" }
Status code: 500
- The server has received the request but encountered an internal error.
{ "error_code" : "LTS.0202", "error_msg" : "Failed to query lts struct log" }
- The server has received the request but encountered an internal error.
{ "error_code": "LTS.0010", "error_msg": "Internal Server Error" }
Status Codes
Status Code |
Description |
---|---|
200 |
The request has succeeded. |
201 |
The request has succeeded. The transfer task has been created. |
400 |
The request is invalid. Modify the request based on the description in error_msg before a retry. |
403 |
The server understood the request but refused to authorize it. The client should not repeat the request without modifications. |
500 |
The server has received the request but encountered an internal error. |
503 |
The requested service is unavailable. |
Error Codes
For details, see Error Codes.
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