The log analysis feature helps you collect and store logs from devices that access Secure Access Service Edge (SASE). Powered by Simple Log Service, this feature supports querying, analysis, statistical charts, and alerting. This frees you to focus on analysis rather than data management. 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 left-side navigation pane, choose .
-
In the upper-right corner of the Log Analysis page, click Log Status to enable log collection and storage.
SASE log types
View logs and enable log delivery
-
Click the drop-down list in the upper-left corner of the page.
-
Select the log type 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.
The supported log types include private access log, PA sensitive file download detection log, enterprise acceleration log, client logon log, client status log, DLP log, OneData log, and Internet access log.
-
In the search box at the top of the page, enter a search statement. In the time picker to the right of the search box, set a time range for your query.
A query consists of a search statement and an optional analytic statement, separated by a vertical bar (|). The format is:
Search statement|Analytic statement.Statement type
Optional
Description
Search statement
Required
Specifies the search conditions. It can be a keyword, a fuzzy query, a numeric value, a numeric range, or a combination of conditions.
If you leave this empty or enter an asterisk (*), all data within the specified time range is returned. For more information, see Query syntax and features.
Analytic statement
Optional
Processes the data returned by the search statement for computation and aggregation.
If you leave this empty, only the query results are returned and no statistical analysis is performed. For more information, see Query and analysis overview.
Note-
In an analytic statement, you can omit the standard SQL clause
from table_name, which isfrom log. -
By default, the first 100 log entries are returned. You can use the LIMIT clause to change the number of entries returned.
Log analysis queries
-
-
Click Search & Analyze to view the analysis results.
The SLS Logs feature provides query and 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 Search & Analyze page.
View data reports
You can view a Data Report for OneData log and Internet access log.
-
From the drop-down list, select OneData log or Internet access log, and then click the Data Report tab.
-
On the Data Report tab, view the log-related data.
-
Time Range: In the upper-right corner, click the time range to specify the period for the report.
-
Drill-Down Analysis: In the upper-right corner of the report, click the
icon. In the Drill-Down Analysis dialog box, you can view data from different data sources.In the upper-left corner of the dialog box, select Prometheus from the Data Source Type drop-down list, set a time range, configure the metric query conditions (including Metrics Explorer, Region, and Instance), and then click Execute Query. On the right, you can switch between visualization types such as Table, Line, Bar, Stat, Pie, Gauge, and Meter.
-
Log fields
|
Field name |
Description |
Example |
|
__time__ |
The time when the log was received by Simple Log Service. |
2018-02-27 11:58:15 |
|
aliuid |
The Alibaba Cloud account ID. |
141681795035**** |
|
username |
The username of the employee. |
John Doe |
|
department |
The department of the enterprise employee. |
Test Department |
|
action |
The value of this field depends on the log type. This field is supported for For
For
|
block |
|
device_type |
The endpoint device type. Valid values:
|
Windows |
|
device_tag |
A unique identifier for the device. |
ccabaebc-77b3-a877-23f1-31b89b59**** |
|
domain |
The domain name of the website accessed on the private network. |
www.aliyundoc.com |
|
dst_addr |
The destination address for private access . |
10.2.XX.XX |
|
dst_port |
The destination port for private access . |
80 |
|
src_addr |
The source address for private access . |
10.4.XX.XX |
|
src_port |
The source port for private access . |
30001 |
|
in_bytes |
The inbound traffic. Unit: byte. |
234 |
|
out_bytes |
The outbound traffic. Unit: byte. |
567 |
|
log_type |
The log type. Examples:
|
ia_access_log |
|
policy_name |
The policy name. |
test |
|
protocol |
The protocol. Valid values:
|
tcp |
|
request_uri |
The request URI. |
/test.php |
|
app_status |
The client status. Valid values:
|
Online |
|
event_time |
The time when the event occurred. This value is a UNIX timestamp. Unit: seconds. |
1675278754 |
|
unixtime |
The time when the event was recorded. This value is a UNIX timestamp. Unit: seconds. |
1675278754 |