Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command failed: MongoError: CMD_NOT_ALLOWED: profile

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
like image 348
San Jaisy Avatar asked Oct 26 '25 13:10

San Jaisy


1 Answers

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/

like image 185
mvg Avatar answered Oct 28 '25 02:10

mvg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!