如何使用 mongotop 和 mongostat 监控 MongoDB 集群
mongotop 是一款基于 mongod 进程的工具,无法对 mongos 进程执行。如果你想要查看 mongos 的活动情况,可以使用 mongostat。
命令如下:
mongostat --host '<mongos-hostname>:<port>' --discover
其中 <mongos-hostname> 和 <port> 需要替换成你的 mongos 主机名和端口号。--discover 选项可以自动发现 mongos 的所有节点。
原文地址: https://www.cveoy.top/t/topic/mQY2 著作权归作者所有。请勿转载和采集!