- What's New
- Function Overview
- Service Overview
- Billing
- Getting Started
-
User Guide
- Buying SecMaster
- Authorizing SecMaster
- Viewing Security Overview
- Workspaces
- Viewing Purchased Resources
- Security Situation
- Resource Manager
- Risk Prevention
- Threat Operations
- Security Orchestration
-
Playbook Overview
- Ransomware Incident Response Solution
- Attack Link Analysis Alert Notification
- HSS Isolation and Killing of Malware
- Automatic Renaming of Alert Names
- Auto High-Risk Vulnerability Notification
- Automatic Notification of High-Risk Alerts
- Auto Blocking for High-risk Alerts
- Real-time Notification of Critical Organization and Management Operations
-
Settings
- Data Integration
-
Log Data Collection
- Data Collection Overview
- Adding a Node
- Configuring a Component
- Adding a Connection
- Creating and Editing a Parser
- Adding and Editing a Collection Channel
- Managing Connections
- Managing Parsers
- Managing Collection Channels
- Viewing Collection Nodes
- Managing Nodes and Components
- Partitioning a Disk
- Logstash Configuration Description
- Connector Rules
- Parser Rules
- Upgrading the Component Controller
- Customizing Directories
- Permissions Management
- Key Operations Recorded by CTS
-
Best Practices
-
Log Access and Transfer Operation Guide
- Solution Overview
- Resource Planning
- Process Flow
-
Procedure
- (Optional) Step 1: Buy an ECS
- (Optional) Step 2: Buy a Data Disk
- (Optional) Step 3: Attach a Data Disk
- Step 4: Create a Non-administrator IAM User
- Step 5: Configure Network Connection
- Step 6: Install the Component Controller (isap-agent)
- Step 7: Install the Log Collection Component (Logstash)
- (Optional) Step 8: Creating a Log Storage Pipeline
- Step 9: Configure a Connector
- (Optional) Step 10: Configure a Log Parser
- Step 11: Configure a Log Collection Channel
- Step 12: Verify Log Access and Transfer
- Credential Leakage Response Solution
-
Log Access and Transfer Operation Guide
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
API
- Alert Management
- Incident Management
- Indicator Management
- Playbook Management
- Alert Rule Management
- Playbook Version Management
- Playbook Rule Management
- Playbook Instance Management
- Playbook Approval Management
- Playbook Action Management
- Incident Relationship Management
- Data Class Management
- Workflow Management
- Data Space Management
- Pipelines
- Workspace Management
- Metering and Billing
- Metric Query
- Baseline Inspection
- Appendix
- FAQs
Query Statements
A query statement is used to specify the filter criteria for log query and return the logs that meet the filter criteria. By setting filter criteria, you can quickly query required logs.
This topic describes query statements and examples.
Syntax
A query statement can be in either of the following formats:
- If the value is only *, full data is returned without filtering.
- It consists of one or more query clauses. The clauses are connected by NOT, AND, and OR. () can be used to increase the priority of the query conditions in parentheses.
The basic structure of a query clause is as follows:
Field Name Operator Field Value
Operators lists the operators that can be used.
Operators
Operator |
Description |
---|---|
= |
Queries logs in which the value of a field is equal to a certain value. |
<> |
Queries the logs in which the value of a field is not equal to a certain value. |
> |
Queries logs in which the value of a field is greater than a specified value. |
< |
Queries logs in which the value of a field is less than a specified value. |
>= |
Queries logs in which the value of a field is greater than or equal to a specified value. |
<= |
Queries logs in which the value of a field is less than or equal to a specified value. |
IN |
Queries the logs whose field values are within a specified value range. |
BETWEEN |
Queries the logs whose field values are in the specified range. |
LIKE |
Searches for logs of a field value in full text. |
IS NULL |
Queries logs whose field value is NULL. |
IS NOT NULL |
Query logs whose field value is NOT NULL. |
Examples
Query Requirement |
Query Statement |
---|---|
All logs |
* |
Logs about successful GET requests (status codes 200 to 299). |
request_method = 'GET' AND status BETWEEN 200 AND 299 |
Logs of GET or POST requests |
request_method = 'GET' OR request_method = 'POST' |
Logs of non-GET requests |
NOT request_method = 'GET' |
Logs about successful GET or POST requests |
(request_method = 'GET' OR request_method = 'POST') AND status BETWEEN 200 AND 299 |
Logs of GET or POST request failures |
(request_method = 'GET' OR request_method = 'POST') NOT status BETWEEN 200 AND 299 |
Logs of successful GET requests (status code: 200 to 299) whose request time is greater than or equal to 60 seconds. |
request_method = 'GET' AND status BETWEEN 200 AND 299 AND request_time >= 60 |
Logs whose request time is 60 seconds. |
request_time = 60 |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.