Re: Profiling

24 views
Skip to first unread message

Gianfranco

unread,
Oct 9, 2012, 9:28:00 AM10/9/12
to mongod...@googlegroups.com
Unfortunately you can't restrict to profile only certain queries connected from a specific IP address.

But you can retrieve all the recorded information coming from a certain client IP (the application).

> db.system.profile.find({client: "127.0.0.0"})

If you want to export such information you can use the mongoexport tool

> mongoexport -q "{client: '127.0.0.1'}" -d database -c system.profile

Where 127.0.0.1 is the application ip address

On Tuesday, October 9, 2012 12:19:48 PM UTC+1, Rubén Ortiz wrote:
Hello

I have to profile mongo database. Our problem is some changes on the code increase traffic between php web application node and mongo instance. We now is betweem both because netstat is crystal clear.

But althought I have tools like mongotop or mongostat and are cool, I need something more. So I activated profiler in our mongo database. But, again, is not easy for me. I want to profile queries only from one IP and mongo web is not very clear about that.


How can profile queries to one mongo database from one ip client? and how can i export to a log file???

Thanks :/
Reply all
Reply to author
Forward
0 new messages