All Products
Search
Document Center

Simple Log Service:Collect ActionTrail logs to Log Audit Service

Last Updated:Aug 20, 2024

By default, ActionTrail only records events from the past 90 days for each Alibaba Cloud account. If you have not created a trail, you cannot trace events older than 90 days. This topic describes how to create a trail and collect events into the project associated with Log Audit Service for long-term storage and analysis.

Background information

When you deliver events using an Alibaba Cloud account, events related to the Alibaba Cloud account and all RAM users within the account are delivered. When you deliver events using a RAM user, you need to grant the RAM user permission to manage trails first. For more information, see Grant permissions to a RAM user.

How it works

When you create a trail and deliver it to Simple Log Service (SLS), events are stored in JSON format in the SLS Logstore. New events are usually delivered to your SLS Logstore within one minute, making it convenient for subsequent query and analysis.

image

1. Associate the project

ActionTrail logs are integrated into the project associated with Log Audit Service.

  1. Log on to the Simple Log Service console. On the Audit & Security tab of the Log Application section , click Log Audit Service (New Version).

  2. On the Log Audit (New Version) page, click Associate Project, configure the project in the dialog box, and then click Confirm.

    image

2. Create a trail

  1. Log on to the ActionTrail console. In the left navigation pane, click Trails, and then click Create Trail. On the Create Trail page, configure Basic Information and Event Delivery. For example, refer to the figure below, configure the trail name as sample-production-actiontrail, and deliver events to the associated Simple Log Service project sample-production-cn-shanghai.

    Note

    ActionTrail automatically creates a Logstore named actiontrail_<trail name>.

    image

  2. After the trail is successfully created, view the detailed configuration.

    image

3. Verify collection results

  1. On the Log Audit (New Version) page, click the name of the associated project.

    image

  2. On the Cloud Services tab, ActionTrail is enabled, click View.

    image

  3. On the Query and Analysis > ActionTrail Logs page, the Logstore is actiontrail_sample-production-actiontrail. Use Search syntax for query and analysis.

    image

References