-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
The legacy "mongo" shell is no longer available for download, and officially deprecated as of MongoDB 6.0. As the "getMongoData.js" exists today, it breaks under two known conditions:
- "hostname()" is no longer a supported command in mongosh. Use "os.hostname()" instead.
- MDB 6.0 has deprecated "db.printSlaveReplicationInfo()". Use "db.printSecondaryReplicationInfo()" instead.
I have cloned and modified the existing script to support mongosh and MDB 6.0, you can find it and the revisions here:
https://gist.github.com/TravWill-Mongo/1bb4fdbac8a4491cb2f1d76c77afba9a
For this to be properly integrated, we would need to have some conditional logic to use the right commands based upon version.
For what it's worth, I have only tested this on the following setup:
- mongosh 1.6.1
- mongod - 6.0.1
- Operating System: Mac OS X 12.6.1
Thanks!
hendritjipto
Metadata
Metadata
Assignees
Labels
No labels