All Products
Search
Document Center

ActionTrail:What do I do if the advanced event query and event alerting features of ActionTrail are unavailable?

Last Updated:Oct 11, 2023

When you create a trail and deliver events to Simple Log Service, ActionTrail automatically creates a Simple Log Service Logstore and configures indexes for the Logstore. If you manually delete or modify the indexes, the advanced event query and event alerting features may become unavailable. In this case, you must restore the index settings.

Restore the index settings in the ActionTrail console

If the advanced event query and event alerting features of ActionTrail are unavailable, you can perform the following steps to restore the index settings:

  1. Log on to the ActionTrail console.

  2. In the left-side navigation pane, click Trails.

  3. On the Trails page, find the trail that you created, move the pointer over OSS or SLS & OSS in the Storage Service column, and then click the name of the Simple Log Service Logstore.

  4. In the Simple Log Service console, choose Index Attributes > Attributes on the page of the Logstore.

  5. In the Search & Analysis panel, turn off LogReduce, turn on Full Text Index, and then turn on Enable Analytics for required fields in the event.

  6. Click OK.

  7. In the Search & Analysis Settings message, click OK.

Restore the index settings by using Cloud Shell

If the advanced event query and event alerting features of ActionTrail are unavailable, you can use Cloud Shell to restore the index settings.

  1. Log on to Cloud Shell.

  2. Run the following command to restore the index settings:

    actiontrail-update-index [project] [logstore] [regionId]
    Note

    Replace project, logstore, and regionId in the command with the actual values that are configured in Simple Log Service. project specifies the name of the Simple Log Service project, logstore specifies the name of the Simple Log Service Logstore, and regionId specifies the region where the Simple Log Service project resides. You can obtain the values on the trail details page in the ActionTrail console.

    Sample code:

    actiontrail-update-index actiontrail-ev****  actiontrail-test**** cn-hangzhou