This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.action.find({ location: { $geoWithin: { $polygon: | |
| [ [ -5.577327758073807, 53.92722913826002 ], | |
| [ -5.628384947776794, 53.94341400538505 ], | |
| .. | |
| [ -7.603911347687244, 53.48786460176994 ] ] } | |
| } | |
| }).limit(1000).sort( "time": 1}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| actionType : "PLAY", | |
| .. | |
| location : { lon : Double , lat : Double }, | |
| time : ISODate(..) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "result" : [ | |
| { | |
| "_id" : { | |
| "endpoint" : "profiles/updates_pending" | |
| }, | |
| "avgResponseTime" : 118.69420306241872, | |
| "count" : 749800 | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.event.api.aggregate({ | |
| $match: { | |
| date: { | |
| $gt: ISODate("2014-05-08T20:02:33.133Z"), | |
| $lt: ISODate("2014-05-09T20:02:33.133Z"), | |
| } | |
| } | |
| }, { | |
| $group: { | |
| _id: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > db.event.web.group_sharing.create_group.find().pretty() | |
| { | |
| "_id" : ObjectId("536c07e148022c1069b4ff3d"), | |
| "via" : "web", | |
| "user_id" : ObjectId("536bfbea61bb78af76e2a94d"), | |
| "user_joined_at" : ISODate("2014-05-08T21:49:30Z"), | |
| "date" : ISODate("2014-05-08T22:40:33.880Z"), | |
| "group" : { | |
| "profile_ids" : [ | |
| "536c074d613b7d9924e1a90f", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.event.api.findOne() | |
| { | |
| "_id" : ObjectId("536c1a7648222c105f807212"), | |
| "endpoint" : { | |
| "name" : "updates/create" | |
| }, | |
| "user_id" : ObjectId("50367b2c6ffb36784c000048"), | |
| "params" : { | |
| "get" : { | |
| "text" : "Sending a test update for the the blog post!", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > db.event.visits.findOne({date:{$gt:ISODate("2014-05-05")}}) | |
| { | |
| "_id" : ObjectId("5366d48148222c37e51a9f31"), | |
| "domain" : "blog.rafflecopter.com", | |
| "user_id" : null, | |
| "ip" : "50.27.200.15", | |
| "user_joined_at" : null, | |
| "visitor_id" : ObjectId("5366d48151823c7914450517"), | |
| "uri" : "", | |
| "agent" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $visit_event = array( | |
| 'visitor_id' => $visitor_id, | |
| 'ip' => $ip_address, | |
| 'uri' => $uri, | |
| 'referrer' => $referrer, | |
| 'user_agent' => $user_agent | |
| ); | |
| //track, < metric name >, < metric data > , < operation type > | |
| $visitor->track('visits', $visit_event, 'event') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mlogfilter mongod.log mongod-sec.log mongod-arb.log --from Apr 5 20:15 --to +5min |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep "majority" mongod.log | mplotqueries --overlay | |
| mplotqueries mongod.log --type rsstate |