You can query operational logs of an instance in the ApsaraDB for MongoDB console to learn about its state.

Prerequisites

The instance is a general-purpose instance with local disks or a dedicated instance with local disks.
Note You can check the instance type of the instance in the Category column of the tables in the Instance types topic.

Precautions

The retention period for operational logs is 72 hours.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and region to which the instance belongs.
  3. In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.
  4. Click the ID of an instance, or click More icon in the Actions column corresponding to the instance and select Manage.
  5. In the left-side navigation pane of the instance details page, choose Logs > Running Logs.
  6. View operational logs based on the instance type.
    • Replica set instance
      Specify the node role and time range to view operational logs.
    • Sharded cluster instance
      View operational logs of mongos or shard nodes.
      Note Mongos nodes have IDs prefixed with s-. Shard nodes have IDs prefixed with d-.
      • View the operational logs of a mongos node.

        Specify the mongos node ID and time range to view the operational logs.

      • View the operational logs of a shard node.

        Specify the shard node ID, role, and time range to view operational logs.