# Percona audit filter and parameter

**URL:** <https://forums.percona.com/t/percona-audit-filter-and-parameter/4762>\
**Category:** Percona Server for MongoDB\
**Created:** [March 8, 2016, 5:35am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762 "2016-03-08T05:35:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmarchet](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mmarchet](https://forums.percona.com/u/mmarchet)\
**Post date:** [March 8, 2016, 5:35am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762/1 "2016-03-08T05:35:14Z")

</div>

Hello,

I’m trying to use filters with auditLog, and I’m currently facing an issue :

I’d like to print only commands like “insert”, “delete”, “update” from a precise database in my log file. I tried few things, but none of them worked out.  
I went through Percona and Mongodb doc, and I found out that with Mongo Enterprise I’d have to use “setParameter {auditAuthorizationSuccess: true}” as parameter to get what I want.  
But if I try using this in my mongod.conf file, or in command line, I have an error : "Unrecognized option: setParameter { auditAuthorizationSuccess ".  
I tried to find anything about it in Persona doc, but I couldn’t find an answer.

Here’s the audit part of my mongod.conf file :

```auto
audit:
destination: file
format: JSON
path: /data/log/mongodb/vip-auditLog.json
filter: '{ atype: "authCheck", "users.db": "vip", "param.command": {$in: ["insert", "delete", "update", "find", "findandmodify"] } }'
setParameter { auditAuthorizationSuccess: true }

```

I’m using ubuntu 14.04 LTS.

Could anyone help me out ? 🙂

---

<div class="post-metadata">

**Author:** ![goldstrike](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@goldstrike](https://forums.percona.com/u/goldstrike)\
**Post date:** [March 8, 2016, 9:08am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762/2 "2016-03-08T09:08:03Z")

</div>

Only entered at the command line when starting a mongod like this

/usr/bin/mongod -f /etc/mongod.conf --auditDestination file --auditFormat JSON --auditPath /var/log/mongodb/audit.json

---

<div class="post-metadata">

**Author:** ![jontobs](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jontobs/32/22_2.png) [@jontobs](https://forums.percona.com/u/jontobs)\
**Post date:** [March 8, 2016, 9:15am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762/3 "2016-03-08T09:15:55Z")

</div>

mmarchet,  
Thanks for reaching out. From your question, I can infer that our documentation is lacking regarding the audit plugin and its use. As always, we both rely on and value feedback from the community. With that in mind, we would very much welcome your input into how we can get the documentation to a better state. The best method for feedback is our [documentation section in Jira](https://jira.percona.com/secure/RapidBoard.jspa?rapidView=5&projectKey=DOC)

All the best,  
Jon

---

<div class="post-metadata">

**Author:** ![mmarchet](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mmarchet](https://forums.percona.com/u/mmarchet)\
**Post date:** [March 8, 2016, 9:40am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762/4 "2016-03-08T09:40:41Z")

</div>

Hello,

goldstrike : Thanks for you answer, unfortunately, it doesn’t solve my problem about how “auditAuthorizationSuccess” is implemented with Percona.

jontobs : I’ll have a look at Jira and post my feedback there.

---

<div class="post-metadata">

**Author:** ![mmarchet](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mmarchet](https://forums.percona.com/u/mmarchet)\
**Post date:** [March 21, 2016, 10:50am UTC](https://forums.percona.com/t/percona-audit-filter-and-parameter/4762/5 "2016-03-21T10:50:38Z")

</div>

Still no news about it ?
