You can query the error logs of an instance in the ApsaraDB for Redis console.

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.

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 > Error Logs.
  6. View error logs based on the instance type.
    • Replica set instance
      Specify the node role and time range to view error logs.
    • Sharded cluster instance
      View error logs of mongos or shard nodes.
      Note Mongos nodes have IDs prefixed with s-. Shard nodes have IDs prefixed with d-.
      • View the error logs of a mongos node.

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

      • View the error logs of a shard node.

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