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.从4.0版开始,MongoDB(社区版)为Standalone和副本集提供免费云监控。
Free monitoring provides information about your deployment, including:免费监控提供有关部署的信息,包括:
The data expires 24 hours after being uploaded. 数据上传24小时后过期。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()
.db.enableFreeMonitoring()
和db.disableFreeMonitoring()
在运行时启用/禁用自由监视。
You can also enable or disable free monitoring during 您还可以在mongod
startup using either:mongod
启动期间使用以下任一选项启用或禁用免费监控:
cloud.monitoring.free.state
orcloud.monitoring.free.state
或--enableFreeMonitoring
--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.serverStatus
和助手db.serverStatus()
还包括freeMonitoring
字段中的免费监视统计信息。When running with access control, the user must have the following privileges to enable free monitoring and get status:使用访问控制运行时,用户必须具有以下权限才能启用免费监视并获取状态:
{ resource: { cluster : true }, actions: [ "setFreeMonitoring", "checkFreeMonitoringStatus" ] }
The built-in role 内置角色clusterMonitor
role provides this privilege.clusterMonitor
角色提供此权限。
When enabled, the monitored data is uploaded periodically. 启用后,将定期上载监控数据。The monitored data expires after 24 hours. 监控数据在24小时后过期。That is, you can only access monitored data that has been uploaded within the past 24 hours.也就是说,您只能访问过去24小时内上传的监控数据。
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.如果禁用免费监控,然后重新启用免费监控,则可以访问在过去24小时内尚未过期的以前指标。
When you enable free monitoring, you are provided with a unique URL where you can access your monitored data.当您启用免费监控时,系统会为您提供一个唯一的URL,您可以在其中访问受监控的数据。
Anyone with whom you share this unique URL can access your monitored data.与您共享此唯一URL的任何人都可以访问您的监控数据。