For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Configure Telemetry Options

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.

mongosh tracks the following data:

  • The type of MongoDB mongosh is connected to. For example, Enterprise Edition or Community Edition.

  • The methods run in mongosh. mongosh only 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 mongosh sends telemetry data, your IP address is visible to the endpoint, but mongosh does 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.

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 --eval startup option.

The following command starts mongosh with telemetry disabled:

mongosh --nodb --eval "disableTelemetry()"
enableTelemetry()

Enable telemetry for mongosh.

enableTelemetry()

The command response confirms that telemetry is enabled:

Telemetry is now enabled.