4

I am using the Atlas free cluster mongodb and try to enable the profiler for the monitoring purpose and I have an Atlas Admin access on the cluster

profiller setting image

On the setting, the profiler option is enabled as in the diagram above

While I am running the command db.setProfilingLevel(2) getting the below error:

MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.setProfilingLevel(2)
2020-02-01T11:52:51.976+1100 E  QUERY    [js] uncaught exception: Error: command failed: {
    "ok" : 0,
    "errmsg" : "CMD_NOT_ALLOWED: profile",
    "code" : 8000,
    "codeName" : "AtlasError"
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:18:14
_assertCommandWorked@src/mongo/shell/assert.js:583:17
assert.commandWorked@src/mongo/shell/assert.js:673:16
DB.prototype.setProfilingLevel@src/mongo/shell/db.js:681:12
@(shell):1:1
San Jaisy
  • 15,327
  • 34
  • 171
  • 290

1 Answers1

1

Mongodb Atlas free tier blocks profiling options.

You can find operations that are not permitted in Mongodb Atlas free tier below

https://docs.atlas.mongodb.com/reference/unsupported-commands/

mvg
  • 1,574
  • 4
  • 37
  • 63