How do I query the oplog in Atlas ReplicaSet?

Hi,

I am using Altas and connecting to my ReplicaSet using:

mongodb+srv://host:password@xxxx.xxxx.mongodb.net/local

I am in Node.js application and MongoDB official driver
and I still cannot access oplog’s collection I have tried:
“oplog”, “local.oplog.rs” “oplog.rs”
and it still doesn’t retrieve any data from there

Hi @Shay_I,

What type of Atlas cluster are you connecting to?

Oplog Access should be available via the oplog.rs collection in the local database unless you are using the Atlas Serverless preview which doesn’t have oplog access yet.

Regards,
Stennie