-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Diagnostics, Shell
-
None
-
Sharding
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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:
Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
--- 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)