- 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 ECS Text Logs to LTS
- Ingesting CCE Application Logs to LTS
- Ingesting BMS 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 Anti-DDoS Service 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
- Using SDKs 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
- Self-Built Middleware (Beta)
-
Log Search and Analysis
- Overview
- Setting Cloud Structuring Parsing
- Creating a Log Index
- Accessing the Log Search Page
- Using LTS Search Syntax
- Analyzing Logs in LTS
- Creating an LTS Quick Analysis Task
- Saving Conditions for Quick Search
- Viewing Real-Time Logs
-
Using SQL Analysis Syntax
- Overview
- SQL Aggregate Functions
- SQL Period-over-Period Functions
- SQL JSON Functions
- SQL IP Functions
- SQL Mathematical Functions
- SQL Time Functions
- SQL Extrema Functions
- SQL String Functions
- SQL SPLIT Functions
- SQL Comparison Operators
- SQL IP Address Functions
- SQL Reduction Functions
- Other SQL Functions
- SQL JOIN Syntax
- SQL Query Example
-
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 Host Logs from Third-Party Clouds, 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
- Suggestions on LTS Security Configuration
- 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)
- Service Overview
- Getting Started
- Granting LTS Permissions to IAM Users
- Log Management
- Log Ingestion
- Host Management
- Log Search and View
- Log Alarms
- Log Transfer
- Configuration Center
- Querying Real-Time LTS Traces
-
FAQs
-
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 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 Obtain an AK/SK Pair?
- How Do I Install ICAgent by Creating an Agency?
-
Log Ingestion
- What Do I Do If the CPU Usage Is High When ICAgent Is Collecting Logs?
- What Kinds of Logs and Files Does LTS Collect?
- 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?
- How Do I Disable the Function of Collecting CCE Standard Output Logs to AOM on the LTS Console?
- How Long Does It Take to Generate Logs After Configuring Log Ingestion?
- Log Search and Analysis
- Log Transfer
-
Host Management
-
API Reference (Kuala Lumpur Region)
- Before You Start
- Calling APIs
- API Calling Examples
- APIs
- Appendix
- 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.
Querying Log Streams
Function
This API is used to query log stream details. It helps you learn about the running and management status of the log streams and provides comprehensive and accurate data support.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/log-streams
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Parameter description: Project ID. For details about how to obtain it, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Constraints: N/A. Value range: N/A. Default value: N/A. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
log_group_name |
No |
String |
Parameter description: Log group name. Constraints: N/A. Value range: N/A. Default value: N/A. |
log_stream_name |
No |
String |
Parameter description: Log stream name. Constraints: N/A. Value range: N/A. Default value: N/A. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Parameter description: User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token. Constraints: N/A. Value range: N/A. Default value: N/A. |
Content-Type |
Yes |
String |
Parameter description: Set this parameter to application/json;charset=UTF-8. Constraints: N/A. Value range: N/A. Default value: N/A. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
log_streams |
Array of LogStreamNoIsFavorite objects |
Parameter description: List of log groups. Value range: N/A. |
Parameter |
Type |
Description |
---|---|---|
creation_time |
Long |
Parameter description: Log stream creation time. Value range: N/A. |
log_stream_id |
String |
Parameter description: Log stream ID. Value range: N/A. |
log_stream_name |
String |
Parameter description: Log stream name. Value range: N/A. |
log_stream_name_alias |
String |
Parameter description: Log stream alias. Value range: N/A. |
tag |
Map<String,String> |
Parameter description: Parameter description: Log stream tags. Value range: N/A. |
filter_count |
Integer |
Parameter description: Number of filters. This parameter has been brought offline. Value range: N/A. |
hot_cold_separation |
String |
Parameter description: Hot and cold storage switch. Value range: N/A. |
whether_log_storage |
String |
Parameter description: Whether to enable log storage. Value range: N/A. |
auth_web_tracking |
String |
Parameter description: Anonymous write switch. Value range: N/A. |
ttl_in_days |
Integer |
Parameter description: Log storage period (days). Value range: N/A. |
hot_storage_days |
Integer |
Parameter description: Standard storage period (days). Value range: N/A. |
is_favorite |
Boolean |
Parameter description: Whether to favorite the log stream. Value range: N/A. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Parameter description: Error code. Value range: N/A. |
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Parameter description: Error code. Value range: N/A. |
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
Example Requests
If you leave the request body empty, all log streams are queried. If log_group_name and log_stream_name are specified, the corresponding log stream is queried.
GET https://{endpoint}/v2/{project_id}/log-streams /v2/{project_id}/log-streams /v2/{project_id}/log-streams?log_group_name={log_group_name} /v2/{project_id}/log-streams?log_stream_name={log_stream_name} /v2/{project_id}/log-streams?log_stream_name={log_stream_name} &log_group_name={log_group_name}
Example Responses
Status code: 200
Log stream information is returned.
{
"log_streams" : [ {
"log_stream_name_alias" : "lts-topic-xxxx",
"creation_time" : 1698915657847,
"auth_web_tracking" : false,
"log_stream_name" : "lts-topic-xxxx",
"is_favorite" : false,
"hot_storage_days" : -1,
"tag" : {
"_sys_enterprise_project_id" : "xxxxxx"
},
"hot_cold_separation" : false,
"filter_count" : 0,
"log_stream_id" : "xxxxxxx",
"ttl_in_days" : 7,
"whether_log_storage" : true
}, {
"log_stream_name_alias" : "lts-topic-xxxx",
"creation_time" : 1698915650021,
"auth_web_tracking" : false,
"log_stream_name" : "lts-topic-xxxx",
"is_favorite" : false,
"hot_storage_days" : -1,
"tag" : {
"_sys_enterprise_project_id" : "xxxxxxx"
},
"hot_cold_separation" : false,
"filter_count" : 0,
"log_stream_id" : "xxxxxxxxxxxxxxxxxxx",
"ttl_in_days" : 7,
"whether_log_storage" : true
} ]
}
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{
"error_code" : "LTS.0205",
"error_msg" : "The log stream name has been existed"
}
Status code: 500
The server has received the request but encountered an internal error.
{
"error_code" : "LTS.0010",
"error_msg" : "The system encountered an internal error"
}
Status Codes
Status Code |
Description |
---|---|
200 |
Log stream information is returned. |
400 |
Invalid request. Modify the request based on the description in error_msg before a retry. |
500 |
The server has received the request but encountered an internal error. |
Error Codes
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