【文件属性】:
文件名称:mongodb-balance-check:检查您的 MongoDB 分片集群是否正确平衡
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-21 02:04:54
Python
mongodb-平衡检查
此脚本提供了一种简单的方法来确定您的 MongoDB 分片集群是否正确平衡。
您可以通过调用db.printShardingStatus()实现相同的效果,但它需要手动解析输出以查看所有集合的计数是否平衡,如果您有很多……或者很懒,这可能会很困难。 该脚本为您完成并明确说明。
要求
Python
安装
git clone git://github.com/serverdensity/mongodb-balance-check.git
sudo pip install pymongo
sudo pip install clint
跑步
这假设您有一个在localhost:27017上运行的 mongos
python check.py
控制台输出
它将列出所有数据库中的所有集合,指示它们是否平衡以及每个集合的总块数。
david@sdapp-web1 ~
【文件预览】:
mongodb-balance-check-master
----check.py(43B)
----balanced.py(2KB)
----LICENSE(2KB)
----README.md(4KB)
----MongoBalanced.py(1KB)