On this page本页内容
New in version 4.0.版本4.0中的新功能。
Starting in version 4.0, MongoDB (Community Edition) offers free Cloud monitoring for standalones and replica sets.
Free monitoring provides information about your deployment, including:
The data expires 24 hours after being uploaded. For more information on the data upload and expiration, see Monitored Data and Expiration.
By default, you can enable/disable free monitoring during runtime using db.enableFreeMonitoring()
and db.disableFreeMonitoring()
.
You can also enable or disable free monitoring during mongod
startup using either:
cloud.monitoring.free.state
or--enableFreeMonitoring
Once you enable free monitoring, it remains enabled until you disable it.
To view the state of your free monitoring,
db.getFreeMonitoringStatus()
method.serverStatus
and the helper db.serverStatus()
also includes free monitoring statistics in the freeMonitoring
field.When running with access control, the user must have the following privileges to enable free monitoring and get status:
The built-in role clusterMonitor
role provides this privilege.
When enabled, the monitored data is uploaded periodically. The monitored data expires after 24 hours. That is, you can only access monitored data that has been uploaded within the past 24 hours.
If you disable free monitoring and later re-enable free monitoring, you can access your previous metrics that have not expired within the past 24 hours.
When you enable free monitoring, you are provided with a unique URL where you can access your monitored data.
Important
Anyone with whom you share this unique URL can access your monitored data.