Homework 3.2 : Change audit filters to audit specific user User Filter

I keep getting the wrong answer for the homework to audit for only steve. I can’t find any additional information. Here’s my connection string: mongod --port 31320 --dbpath /home/vagrant/M310-HW-3.2/r0 --replSet myReplSet --logpath /home/vagrant/M310-HW-3.2/r0/mongodb.log --auditDestination file --auditPath /home/vagrant/M310-HW-3.2/r0/auditLog.json --auditFormat JSON --fork --auditFilter ‘{ “atype”:"",“param.ns”:/^steve/}’

What does your auditlog show
Please check your lab description/requirements and auditfilter section again

1 Like

From the video, Auditing Output Format, here’s the structure of the audit log:

As you can see, you’re querying against the wrong top level fields.

Like @Ramachandra_37567 suggested, look at the output of your audit log, and I would also suggest that you review the Auditing Output Format and Enabling the first Audit Filter videos for a refresher.

1 Like

Thanks. I forgot that we can go back and review the existing audit log to understand the format of the filter.

:slightly_smiling_face: :+1: