Help Center/ Log Tank Service/ Best Practices/ Log Search and Analysis/ Viewing CCE Application Logs on Charts
Updated on 2026-05-15 GMT+08:00

Viewing CCE Application Logs on Charts

You can use SQL statements to search for and analyze logs ingested to LTS, and generate charts to display log data and monitor trends.

This section uses the CCE application logs ingested as an example to describe how the LTS displays CCE application logs on charts.

Prerequisites

Restrictions

Up to 100 charts can be created for a log stream.

Search and Analysis

  1. Log in to the LTS console. In the navigation pane, choose Log Management.
  2. In the log group list, click on the left of a group, and click the desired log stream to go to its details page.
  3. Click the Charts tab. On the tab page displayed, select a time range, enter SQL statements for log search and analysis in the SQL search box, and click Searching and Analyzing Logs.

    Example: Collect the number of logs containing first_timestamp, sort the logs in descending order by number, and return the first 100 records.

    * | select `first_timestamp`, count(*) as log_count from log group by `first_timestamp` order by log_count desc limit 100
    • If more than 1 billion logs are generated within the specified time range, iterative query is triggered so you can view all logs in multiple queries. The message Query status: Results are accurate is displayed.
    • You can select various charts to display the query result.
    • For details about SQL queries, see SQL Functions.
    Figure 1 Searching and analyzing logs

Creating a Chart

  1. Select a chart type and click Create or Save to save the current query result as a chart.

    The following uses a table and bar chart respectively as examples to show charts.
    1. Table

      If you select Table, you can set a layout, such as Standard, Query/Analysis, Table, and Column as required. For details about the parameters, see Table.

      Figure 2 Table
    2. Bar chart

      If you select Bar Chart, you can set a layout, such as Standard, Bar Chart, Query/Analysis, and Legend as required. For details about the parameters, see Bar Chart.

      Figure 3 Bar chart

  2. Click Create. On the page that is displayed, enter Chart Name and SQL Statement.

    Figure 4 Creating a chart

  3. Click OK.

Viewing a Chart

On the Charts tab page, click Show Chart to view the created charts.

Figure 5 Viewing a chart