本地主机上的MongoDB监控服务



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

MongoDB文档提供了有关监控MongoDB的信息,包括监控策略、相关数据库命令和一些自托管监控选项。

如果你关心MongoDB Cloud Manager(née MMS)收集的信息,或者想自己收集这些信息,你可以看到监控代理使用的数据库命令列表。

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()

最新更新