This topic describes how to subscribe to the audit log reports of an ApsaraDB for MongoDB instance by using email or the DingTalk chatbot. The audit log reports of an instance help you obtain the status of the instance on a regular basis.

Prerequisites

The new audit log feature is enabled for the instance. For more information, see Enable the new audit log feature.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Replica Set Instances, or Sharded Cluster Instances based on the instance type.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose Data Security > Audit Logs.
  6. In the upper-right corner of the page that appears, click Subscribe.
    Subscribe button
  7. In the Create Subscription pane, configure the following parameters.
    Parameter Description
    Subscription Name The name of the subscription task. ApsaraDB for MongoDB automatically generates a name for the subscription task. We recommend that you specify an informative name that helps identify the subscription task. The name does not need to be unique. The default name is Mongo audit log center Report.
    Frequency The interval at which ApsaraDB for MongoDB pushes audit log reports to you.
    Global Time The time range from which ApsaraDB for MongoDB extracts audit logs. Valid values:
    • Default
    • Custom: Click Please Select. In the Time pane, select a time range. For more information about the Time pane, see Table 2.
    Add Watermark Specifies whether to enable the watermark feature. After you enable the watermark feature, ApsaraDB for MongoDB adds watermarks to the images in the audit log reports that are pushed to you. The watermarks can be email addresses or webhook URLs.
  8. Click Next.
  9. Select one or more types of notifications from the Notifications drop-down list.
    Notifications drop-down list
    • Email: If you select this notification type, you must configure the Recipients and Subject parameters.
    • WebHook-DingTalk Bot: If you select this notification type, you must configure the Request URL and Title parameters.
  10. Click Submit.