The log analysis feature collects and stores logs from devices that access Secure Access Service Edge (SASE). Based on Alibaba Cloud Simple Log Service, this feature supports query analysis, statistical charts, and alerting. This lets you focus on analysis instead of tedious query and data organization tasks. This topic describes how to enable and view analysis logs.
Prerequisites
The log storage service for SASE is enabled.
Enable the log storage service
Enable log collection and storage
Log on to the SASE console.
In the navigation pane on the left, choose .
In the upper-right corner of the Log Analysis page, click Log Status to enable log collection and storage.

Log types that SASE can store
View logs and enable log delivery
Click the drop-down list in the upper-left corner of the page.
Select the log type that you want to view. You can filter the query results by specifying conditions.
Click the switch next to a log type to enable or disable log delivery for that log type.

Enter a search statement in the search box and set a time range.

A query analysis statement consists of a search statement and an analytic statement, separated by a vertical bar (|). The format is:
Search statement|Analytic statement.Statement type
Optional
Description
Search statement
Required
The search condition. It can be a keyword, a fuzzy query, a numeric value, a numeric range, or a combination of conditions.
If left empty or set to an asterisk (*), no filter conditions are applied to the data within the current time range, and all data is returned. For more information, see Query syntax and features.
Analytic statement
Optional
Computes and aggregates the query results or full data.
If left empty, only the query results are returned, and no statistical analysis is performed. For more information, see Query and analysis overview.
NoteYou can omit the
from table_nameclause, which isfrom log, from the analytic statement as specified in standard SQL syntax.By default, the first 100 log entries are returned. You can use the LIMIT clause to change the number of returned entries.
Common log analysis search statements
Click Search & Analyze to view the analysis results.
The SLS Logs feature provides query analysis results in formats such as a log distribution histogram and Raw Logs. It also supports operations such as setting alerts, creating saved searches, refreshing, and sharing. For more information, see Description of the Query/Analysis page.
View data reports
You can view Data Report for Internet access log.
From the drop-down list, select Internet access log, and then click the Data Report tab.

On the Data Report tab, view the log data.
Time Range: In the upper-right corner of the list, select a time range to display report data for that period.
Drill Down: In the upper-right corner of the report, click
. In the Drill Down dialog box, you can view data from different data sources.
Log field descriptions
Field name | Meaning and description | Example |
__time__ | Operation time. | 2018-02-27 11:58:15 |
aliuid | Alibaba Cloud account ID. | 141681795035**** |
username | Name of the enterprise employee. | John Doe |
department | Department of the enterprise employee. | Test Department |
action | The value of this field varies based on the log type you query. This field is supported for the following log types: intranet access logs and client logon logs. For intranet access logs, the valid values are:
For client logon logs, the valid values are:
| block |
device_type | Device type. Valid values:
| Windows |
device_tag | The unique ID of the device. | ccabaebc-77b3-a877-23f1-31b89b59**** |
domain | The domain name of the website accessed on the intranet. | www.aliyundoc.com |
dst_addr | Destination address for intranet access . | 10.2.XX.XX |
dst_port | Destination port for intranet access . | 80 |
Source address | Source address for intranet access . | 10.4.XX.XX |
src_port | Source port for intranet access . | 30001 |
in_bytes | Inbound traffic. Unit: byte. | 234 |
out_bytes | Outbound traffic. Unit: byte. | 567 |
log_type | Log type. Valid values:
| ia_access_log |
policy_name | Policy name. | test |
protocol | Protocol. Valid values:
| tcp |
request_uri | Request URI. | /test.php |
app_status | Device status. Valid values:
| Online |
event_time | The time when the event occurred. This is a UNIX timestamp. Unit: seconds. | 1675278754 |
unixtime | The time when the event was recorded. This is a UNIX timestamp. Unit: seconds. | 1675278754 |