CLS provides the SQL statistics feature for analyzing the collected log data and graphically displaying the analysis results. It offers a range of statistical charts including line chart, histogram, and pie chart to suit your needs.
This feature is currently in allowlist beta test. To try it out, please submit a ticket for application.
To use the CLS analysis feature, the key-value index of statistical fields must be configured, with statistics enabled.
The analysis statement is composed of search criterion and SQL statement, which are separated by vertical bar (|).
[Search criterion] | [SQL statement]
Calculate the page view (PV) value without a search criterion * | select count(*) as pv
Calculate the PV value with the search criterion of status code 404 status:404 | select count(*) as pv
where. For more information, see SQL syntax.
fromclause for a SQL statement to analyze data of the current log topic by default.
CLS supports the following SQL syntax and functions.
|SELECT||Selects data from the table.|
|AS||Specifies an alias for KEY.|
|GROUP BY||Combines the aggregate function and groups the result set by the KEY(s).|
|ORDER BY||Sorts the result set by the specified KEY.|
|LIMIT||Limits the data volume returned from the
|WHERE||Collects logs that meet the specified criterion.|
|Maximum length of a single statistical field (Value)||The maximum length of a single statistical field (Value) is 32 KB. Any statement exceeding this limit will be truncated.||-|
|Number of non-cluster analysis results (excluding GROUP BY clause)||Each analysis returns up to 1,000 results.||Default: 100; Maximum: 1,000|
|Number of cluster analysis results (including GROUP BY clause)||Each analysis returns up to 100 results.||Default: 100; Maximum: 1,000|
|ORDER BY clause limit||The ORDER BY operation is not supported for fields that have been computed using one of the functions