ActionTrail automatically creates a Simple Log Service (SLS) Logstore and an index when you create a trail and deliver events to SLS. If the index is manually deleted or modified, the advanced event query and event alerting features may become unavailable. To resolve this issue, restore the index settings.
Configure an index in the console
You can restore the index to its default configuration in the ActionTrail console.
-
Log on to the ActionTrail console.
-
In the left navigation pane, click Trail.
-
On the Trails page, find the target trail. In the Storage Service column, hover over SLS or SLS&OSS and then click the name of the SLS Logstore.
-
In the Simple Log Service console, choose .
-
In the Search & Analysis panel, turn off the LogReduce switch, turn on the Full-text Index switch, and then turn on the Enable Analytics switch for the relevant fields within the
eventobject. -
Click Confirm.
-
In the Search & Analysis Settings dialog box, click Confirm.
Use Cloud Shell to set an index
You can also recreate the index by running a command in CloudShell.
-
Log on to CloudShell.
-
Run the following command to create the index.
actiontrail-update-index [project] [logstore] [regionId]NoteReplace the project, logstore, and regionId placeholders with the name of your project, the name of your Logstore, and the ID of the region where your project resides. You can find these values on the trail details page in the ActionTrail console.
Example:
actiontrail-update-index actiontrail-ev**** actiontrail-test**** cn-hangzhou