Free Monitoring免费监控

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和副本集提供免费云监控。

Monitored Data监控数据

Free monitoring provides information about your deployment, including:免费监控提供有关部署的信息,包括:

  • Operation Execution Times操作执行时间
  • Memory Usage内存使用
  • CPU UsageCPU使用率
  • Operation Counts行动很重要

The data expires 24 hours after being uploaded. 数据上传24小时后过期。For more information on the data upload and expiration, see Monitored Data and Expiration.有关数据上传和过期的更多信息,请参阅监控数据和过期

Enable/Disable Free Monitoring启用/禁用免费监控

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启动期间使用以下任一选项启用或禁用免费监控:

Once you enable free monitoring, it remains enabled until you disable it.启用免费监视后,它将保持启用状态,直到禁用它。

To view the state of your free monitoring,要查看免费监控的状态,

Access Control访问控制

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角色提供此权限。

Monitored Data and Expiration监控数据和过期

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小时内尚未过期的以前指标。

Monitoring URL监控URL

When you enable free monitoring, you are provided with a unique URL where you can access your monitored data.当您启用免费监控时,系统会为您提供一个唯一的URL,您可以在其中访问受监控的数据。

Important重要

Anyone with whom you share this unique URL can access your monitored data.与您共享此唯一URL的任何人都可以访问您的监控数据。

←  Monitoring for MongoDBMonitor MongoDB With SNMP on Linux →