All Products
Search
Document Center

Smart Access Gateway:View the access log of an SAG app instance

Last Updated:Mar 12, 2024

After a terminal connects to Alibaba Cloud through the Smart Access Gateway (SAG) app, an access log entry is generated. You can view and subscribe to the access log of the SAG app in the SAG console.

Prerequisites

The SAG app on your terminal can connect to Alibaba Cloud through the SAG app instance. For more information, see Get started with the SAG app.

Step 1: Enable the access log

You must enable the access log for your SAG app instance before you can view the access log. After the access log is enabled, access from all client accounts on the SAG app instance is recorded as log entries.

  1. Log on to the SAG console.
  2. In the left-side navigation pane, choose Smart Access Gateway App > SAG App Instances.
  3. In the top navigation bar, select the region.
  4. On the SAG App Instances page, click the ID of the SAG app instance that you want to manage.

  5. On the Basic Info tab, turn on the Access Log switch.

    开启连接日志

Step 2: View the access log

After you enable the access log, you can view the log data on the Access Log page.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Audit List tab to view access log entries.

    查看客户端连接日志

(Optional) Step 3: Subscribe to the access log

If you need to monitor the connection status of client accounts, you can subscribe to the access log. Access log entries are sent to you as scheduled.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Audit List tab, and then click Subscribe.

  3. In the Create Subscription dialog box, configure the parameters and click OK. The following table describes the parameters.

    Important

    When you create a subscription task, the data to which you can subscribe is listed on the Audit List tab.

    For example, an SAG app instance named A has the access log enabled, and Client 1, Client 2, and Client 3 are created on the SAG app instance. Client 1 and Client 2 are connected to Alibaba Cloud through the SAG app instance, but Client 3 has never used the SAG app instance to connect to Alibaba Cloud. In this case, only the access log entries of Client 1 and Client 2 are generated and displayed on the Audit List tab. When you create a subscription task, you can subscribe to the log data of only Client 1 and Client 2.

    Parameter

    Description

    Email Address

    Enter an email address to receive the log data.

    You can enter multiple email addresses and separate them with commas (,).

    Send At

    Enter the time at which the system sends log data to the specified email addresses.

    SAG Instance ID/Name

    Select the SAG app instance to which you want to subscribe.

    By default, the system collects access log data of all client accounts on the selected SAG app instance.

    Username

    Enter the username of the client account to which you want to subscribe.

    Important

    You must also subscribe to the SAG app instance to which the client account belongs. Otherwise, the system does not send the access log data of the client account.

    Terminal Type

    Select the type of terminal to which you want to subscribe.

    By default, the system collects access log data from all types of terminal on the selected SAG app instance.

    Source

    Select the sources of the selected terminal types. Valid value: All.

    IP

    Select the IP address of the client account to which you want to subscribe. Valid value: All.

    Object

    Select the app behaviors to which you want to subscribe.

    • Log on to App: The SAG app logs on to Alibaba Cloud.

    • Connect App to VPN: The SAG app connects to the internal network.

    • Disconnect App from VPN: The SAG app disconnects from the internal network.

    • Log out of App: The SAG app disconnects from Alibaba Cloud.

    After you create the subscription task, you can view the task information on the Subscription Details tab.查看订阅详情

What to do next

Operation

Procedure

Export the access log

You can export the access log data to a specified email address.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Audit List tab, select one or more log entries, and then click Export to Mail below the list. You can select Export Selected or Export All.

    • If you select Export Selected, the selected log entries are exported to the specified email address.

    • If you select Export All, all log entries on the Audit List tab are exported to the specified email address.

  3. In the Export Information dialog box, enter an email address and click OK.

    You can enter multiple email addresses and separate them with commas (,).

Download the access log

You can download the access log data to an on-premises machine.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Audit List and then click the 下载 icon in the upper-right corner.

  3. Download the access log data on the Audit List tab to a specified on-premises machine.

Modify a subscription task

You can modify the configuration of a subscription task.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Subscription Details tab.

  3. Find the subscription task that you want to modify and click Modify in the Actions column.

  4. In the Modify Subscription dialog box, modify the configuration and click OK.

Unsubscribe from the access log

If you no longer need to subscribe to the access log data of a client account, you can unsubscribe from the client account.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Subscription Details tab.

  3. Find the subscription task and click Cancel Subscription in the Actions column.

    If you need to subscribe to the client account again, you can click Enable Subscription in the Actions column.

Delete a subscription task

If you no longer need to receive access log data of a client account, you can delete the subscription task.

You must unsubscribe from the client account before you can delete the subscription task. For more information, see Unsubscribe from a client account.

  1. In the left-side navigation pane, choose Smart Access Gateway App > Access Log.

  2. On the Access Log page, click the Subscription Details tab.

  3. Find the subscription task that you want to delete and click Delete in the Actions column.

  4. In the Delete Subscription message, click OK.

Disable the access log

If you no longer need to monitor the connection status of client accounts on the SAG app instance, you can disable the access log for the client accounts. Then, the system no longer collects access log data from the client accounts.

  1. In the left-side navigation pane, choose Smart Access Gateway App > SAG App Instances.

  2. In the top navigation bar, select the region where the SAG app instance is deployed.

  3. On the SAG App Instances page, click the ID of the SAG app instance that you want to manage.

  4. On the instance details page, click the Basic Info tab and turn off Access Log.