> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# db.getProfilingStatus() (mongosh method)

The current [`profile`](https://www.mongodb.com/docs/manual/reference/command/profile.md#mongodb-dbcommand-dbcmd.profile) level, [`slowOpThresholdMs`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-operationProfiling.slowOpThresholdMs) setting, [`slowOpInProgressThresholdMs`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-operationProfiling.slowOpInProgressThresholdMs) setting, and [`slowOpSampleRate`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-operationProfiling.slowOpSampleRate) setting.

You can set a `filter` to control which operations are logged by the profiler. When set, any configured filters are also returned by [`db.getProfilingStatus()`](https://www.mongodb.com/docs/manual/reference/method/db.getprofilingstatus.md#mongodb-method-db.getProfilingStatus), along with a `note` explaining filter behavior.

You can set the profiling filter with either:

- the [`db.setProfilingLevel()`](https://www.mongodb.com/docs/manual/reference/method/db.setprofilinglevel.md#mongodb-method-db.setProfilingLevel) shell method, or

- the [`operationProfiling.filter`](https://www.mongodb.com/docs/manual/reference/configuration-options.md#mongodb-setting-operationProfiling.filter) configuration file option.

## Compatibility

This method is available in deployments hosted in the following environments:

- [MongoDB Atlas](https://www.mongodb.com/docs/atlas): The fully managed service for MongoDB deployments in the cloud

**Important:**

This command is not supported in M0 and Flex clusters. For more information, see [Unsupported Commands.](https://www.mongodb.com/docs/atlas/unsupported-commands/)

- [MongoDB Enterprise](https://www.mongodb.com/docs/manual/administration/install-enterprise.md#std-label-install-mdb-enterprise): The subscription-based, self-managed version of MongoDB

- [MongoDB Community](https://www.mongodb.com/docs/manual/administration/install-community.md#std-label-install-mdb-community-edition): The source-available, free-to-use, and self-managed version of MongoDB
