ApsaraDB for MongoDB allows you to set the monitoring granularity to 1 second or 300 seconds, that is, collecting monitoring data once every second or 300 seconds, based on your business needs.
- A replica set or sharded cluster instance is used.
- The database version of the ApsaraDB for MongoDB instance is MongoDB 3.4, 4.0, or 4.2. If the database version is earlier than MongoDB 3.4, you can upgrade the database version. For more information, see Upgrade the database version of an ApsaraDB for MongoDB instance.
Currently, ApsaraDB for MongoDB allows you to collect monitoring data at the finest granularity of 1 second free of charge.
The 1 second monitoring granularity is only available in the latest minor version of ApsaraDB for MongoDB version 3.4. The latest minor version of version 3.4 is compatible with all earlier minor versions.
- An ApsaraDB for MongoDB 3.4 instance created before December 5, 2017 will be automatically upgraded to the latest minor version of version 3.4 available if you have restarted the instance after the specified date. We recommend that you restart your instances during off-peak periods. The monitoring granularity will take effect for all metrics after restart.
- You can set the monitoring granularity to 1 second for an ApsaraDB for MongoDB 3.4 instance created after December 5, 2017. The monitoring granularity takes effect for all metrics immediately.
Monitoring granularity available for each metric
|Metric||Once every second||Once every 300 seconds|
|Disk space usage||Not supported||Supported by all versions|
|Used disk space|
|CPU usage||Supported by version 4.2, version 4.0, and the latest minor version of version 3.4|
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the region where the target instance resides.
- In the left-side navigation pane, click Replica Set Instances or Sharding Instances.
- Find the target instance and click its ID.
- In the left-side navigation pane, click Monitoring Info.
- On the Monitoring Info page that appears, click Monitor Granularity Setting.
- In the Monitor Granularity Setting pane that appears on the right side, set the monitoring granularity.
- Click OK.