using the old conf file format:
dbpath=data/db auth=true auditDestination=file auditFormat=JSON auditPath=data/db/auditLog.json auditFilter={ atype: "authenticate", "param.db": "test" }
I get the following error because of the auditFilter
~/mongodb-build/mongo(master) $ ./mongod -f audit.conf Error parsing YAML config file: yaml-cpp: error at line 6, column 20: illegal map value try './mongod --help' for more information
Same error with
dbpath=data/db auth=true auditDestination=file auditFormat=JSON auditPath=data/db/auditLog.json auditFilter="{ 'atype': 'authenticate', 'param.db': 'test' }"
and
dbpath=data/db
auditDestination=file
auditFormat=JSON
auditPath=data/db/auditLog.json
auditFilter='{ atype: { $in: [ "createCollection", "dropCollection" ] } }'
Also, using the commandline option, single quoting the filter works:
./mongod --dbpath data/db --auditDestination file --auditFilter '{ atype: { $in: [ "createCollection", "dropCollection" ] } }' --auditFormat JSON --auditPath data/db/auditLog.json
But double quoting the filter tries to substitute for $in and throws an error:
./mongod --dbpath data/db --auditDestination file --auditFilter "{ atype: { $in: [ 'createCollection', 'dropCollection' ] } }" --auditFormat JSON --auditPath data/db/auditLog.json 2014-01-29T21:16:43.424-0500 SEVERE: Failed global initialization: BadValue bad auditFilter:code FailedToParse: FailedToParse: First character in field must be [A-Za-z$_]: offset:11 of:{ atype: { : [ 'createCollection', 'dropCollection' ] } }