简体   繁体   English

本地主机上的MongoDB监视服务

[英]MongoDB monitoring service on local host

Is there a MongoDB server performance monitoring tool which I can run on a local host or a local machine? 是否有可以在本地主机或本地计算机上运行的MongoDB服务器性能监视工具? I am concerned about privacy issues while using third-party hosting tools like MongoDB Monitoring Service. 使用第三方托管工具(如MongoDB Monitoring Service)时,我担心隐私问题。

The MongoDB documentation has information on Monitoring MongoDB including monitoring strategies, relevant database commands , and some self-hosted monitoring options . MongoDB文档包含有关监视MongoDB的信息,包括监视策略,相关的数据库命令以及一些自托管的监视选项

If you are concerned about the information collected by MongoDB Cloud Manager (née MMS) or would like to collect this information yourself, you can see a list of database commands used by the monitoring agent . 如果您担心由MongoDB Cloud Manager(néeMMS)收集的信息,或者想自己收集这些信息,则可以查看监视代理程序使用数据库命令列表。

MongoBird is best monitoring tool for MongoDB. MongoBird是MongoDB的最佳监视工具。 It can be installed on all platforms. 它可以安装在所有平台上。 because it is developed in Java. 因为它是用Java开发的。 So, you can install mongobird on the local host. 因此,您可以在本地主机上安装mongobird。

MongoDB has created a free monitoring tool in version 4.0 which works on localhost. MongoDB在版本4.0中创建了一个免费的监视工具 ,该工具可在localhost上运行。 To use it just connect to the database and run db.enableFreeMonitoring() 要使用它,只需连接到数据库并运行db.enableFreeMonitoring()

For Example: 例如:

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

Once you've connected you can enable monitoring like so: 连接后,您可以启用监视功能,如下所示:

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
}

Then go to the url provided ( https://cloud.mongodb.com/freemonitoring/... ). 然后转到提供的URL( https://cloud.mongodb.com/freemonitoring/... )。

Finally, to disable monitoring: 最后,要禁用监视:

test> db.disableFreeMonitoring()

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

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