百度智能云

All Product Document

          Log Service

          Log Query

          Log Query

          Log query is used to query and count the data content of the existing log store. Log Service BLS provides a complete set of data query syntax, please refer to query syntax for details.

          1.Log in to official website of Baidu AI Cloud, and click "Management Console" in the upper right corner to quickly enter the console interface.

          2.Select "Product Service > Log Service BLS" to enter the "Log Query" page.

          image.png

          3.Select the log store, log stream, and time range, enter the SQL statement in the SQL statement edit box, or quote the SQL statement in the example, click "Query" to start executing the query statement, and return the result and display it below.

          • Select log store: You can select the log store created by the current region user, and you can manually enter the log store name to filter the log store.
          • Select log stream: You can select the log stream of the selected log store. If you leave it blank, it means to query all log streams.
          • Reference example: The SQL sample statement provided by the service by default, click "quote" to automatically bring the SQL statement into the input box.
          • Query time: The time required to execute the SQL statement.
          • Number of scan logs: The total number of log data scanned when the SQL statement is executed this time.

          4.Auto Refresh: The data query result is not automatically refreshed by default. After the user selects the automatic refresh period, the SQL statement will be automatically executed according to the interval time to re-execute the query.

          5.Data download: If you need to download the query result data to the local, you can click "Download" to download the log data in CSV format.

          6.Save as: If you need to check the data results of this query frequently, you can click "Save as" to save the current data query as "Fast Query". Enter "Fast Query" to automatically execute SQL query statements and display query results.

          Histogram

          The log distribution histogram mainly shows the time distribution of the queried logs. Move the mouse into the histogram, and you can view the time and log data corresponding to each bar.

          On the "Log Query" page, you can open the log index. After it is enabled, you can perform keyword search on log fields and execute SQL queries based on the search results.

          Index Configuration

          After clicking "Index Configuration", you can manually add and delete fields, and set the field name and data type. Data type support text/long/float/bool.

          In the index configuration window, click View Field Information to automatically obtain the logs collected in the last 10 minutes by the specified log store and parse the field information. You can use the parsed field information to directly fill or cover the index field configuration.

          Search Analysis

          After the index is turned on, BLS supports query and analysis of log data using search + SQL syntax. Query statements are in the form of Search | SQL, and the search statements and SQL statements are separated by vertical bars. For details on syntax, see Search Syntax.

          If you need to perform a SQL query on the entire log, you can write an asterisk in the search statement to indicate that all logs are matched. E.g. * | select * limit 10;

          After opening the index, you can use the search syntax to search the log by keywords.

          You can also perform SQL queries based on the search results.

          Previous
          Fast Query
          Next
          SQL Syntax