繁体   English   中英

本地主机上的MongoDB监视服务

[英]MongoDB monitoring service on local host

是否有可以在本地主机或本地计算机上运行的MongoDB服务器性能监视工具? 使用第三方托管工具(如MongoDB Monitoring Service)时,我担心隐私问题。

MongoDB文档包含有关监视MongoDB的信息,包括监视策略,相关的数据库命令以及一些自托管的监视选项

如果您担心由MongoDB Cloud Manager(néeMMS)收集的信息,或者想自己收集这些信息,则可以查看监视代理程序使用数据库命令列表。

MongoBird是MongoDB的最佳监视工具。 它可以安装在所有平台上。 因为它是用Java开发的。 因此,您可以在本地主机上安装mongobird。

MongoDB在版本4.0中创建了一个免费的监视工具 ,该工具可在localhost上运行。 要使用它,只需连接到数据库并运行db.enableFreeMonitoring()

例如:

mongo test
MongoDB shell version v4.0.4
connecting to: mongodb://127.0.0.1:27017/test

连接后,您可以启用监视功能,如下所示:

test> db.enableFreeMonitoring()
{
 "state": "enabled",
 "message": "To see your monitoring data, navigate to the unique URL below. Anyone you share the URL with will also be able to view this page. You can disable monitoring at any time by running db.disableFreeMonitoring().",
 "url": "https://cloud.mongodb.com/freemonitoring/cluster/HZL3ISL73QLWSNEAYMER2FGR3BINAEGJ",
 "userReminder": "",
 "ok": 1
}

然后转到提供的URL( https://cloud.mongodb.com/freemonitoring/... )。

最后,要禁用监视:

test> db.disableFreeMonitoring()

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM