mongosh collects pseudo-anonymous aggregated usage data to improve MongoDB products. mongosh collects this data by default. mongosh collects data during interactive and agentic sessions only, not scripted sessions. You can disable this data collection at any time.
Data Tracked by mongosh
mongosh tracks the following data:
The type of MongoDB
mongoshis connected to. For example, Enterprise Edition or Community Edition.The methods run in
mongosh.mongoshonly tracks the names of the methods, and does not track any arguments supplied to methods.Whether you run scripts with
mongosh.Errors.
Your IP address. When
mongoshsends telemetry data, your IP address is visible to the endpoint, butmongoshdoes not store it with your telemetry data.
mongosh does not track:
Usernames or credentials.
Queries run in
mongosh.Any data stored in your MongoDB deployment.
Toggle Telemetry Collection
Use the following methods in mongosh to toggle telemetry data collection.
disableTelemetry()Disable telemetry for
mongosh.disableTelemetry() The command response confirms that telemetry is disabled:
Telemetry is now disabled. Tip
You can also disable telemetry at startup by using the
--evalstartup option.The following command starts
mongoshwith telemetry disabled:mongosh --nodb --eval "disableTelemetry()"