Log on to the ActionTrail console.
Click Trail list in the navigation pane.
Select a region, then click Create Trail. This is the home region of the trail.
Enter a name for the trail.
- For Create new OSS Bucket:
- Select Yes, and enter a name for the bucket.
- Select No. In the OSS Bucket list, select a bucket.
Move the slider to the right to Enable logging.
Click Submit. If this is the first trail you create, there will be a window informing you to authorize ActionTrail to have access to OSS.
You can change the OSS bucket on the console after the trail is created. Then the logs are stored in the new bucket.
Note: The format of OSS storage path
oss://<bucket>/<Log file prefix>/AliyunLogs/Actiontrail/<region>/<YYYY>/<MM>/<DD>/<Log data file>
An example path of a file stored in OSS is as follows.
ActionTrail records are saved to an OSS bucket as logs in a compressed JSON formatted file. The maximum file size is 2 KB.
You can further analyze the logs using E-MapReduce or a third-party log analysis service.