Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
None
-
Sharding
Description
sh.status() lists useful config db metadata, such as config version, shards, databases, chunks, etc. However, it doesn't say where this data is actually coming from.
In the case where configDB isn't passed to printShardingStatus and defaults to "config", it would be useful to also run db.serverCmdLineOpts() and pull out parsed.sharding.configDB (or parsed.configdb if that doesn't exist (for pre-2.6)), and then if this exists display it alongside the other sharding-related info, eg:
--- Sharding Status ---
|
sharding version: { "_id" : 1, "version" : 3 }
|
+ configdb:
|
+ host.local:27020,host.local:27021,host.local:27022
|
shards:
|
{ "_id" : "shard0000", "host" : "host.local:27018" }
|
{ "_id" : "shard0001", "host" : "host.local:27019" }
|
databases:
|
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
|
{ "_id" : "test", "partitioned" : true, "primary" : "shard0000" }
|
test.test
|
shard key: { "x" : 1 }
|
chunks:
|
shard0000 1
|
{ "x" : { "$minKey" : 1 } } -->> { "x" : { "$maxKey" : 1 } } on : shard0000 Timestamp(1, 0) |