Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caosiyang/fluent-plugin-mongo-slow-query
fluent plugin for mongoDB slow query
https://github.com/caosiyang/fluent-plugin-mongo-slow-query
Last synced: about 2 months ago
JSON representation
fluent plugin for mongoDB slow query
- Host: GitHub
- URL: https://github.com/caosiyang/fluent-plugin-mongo-slow-query
- Owner: caosiyang
- Created: 2014-06-27T10:25:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-25T03:53:06.000Z (over 9 years ago)
- Last Synced: 2024-02-04T18:34:01.721Z (11 months ago)
- Language: Ruby
- Homepage:
- Size: 315 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fluent-plugin-mongo-slow-query
It will be helpful to find out the slow operations of MongoDB and ayalyze the query prototype.
The usage is almost same as **in_tail**.## Install
```$ fluent-gem install fluent-plugin-mongo-slow-query```
## Configuration
```
type mongo_slow_query
path /path/to/mongodb/logfile```
## Description
- **time** local time of host that the MongoDB instance is running on
- **op** operation, for example: query update remove getmore command
- **ns** namespace, concatenation of the database name and the collection name
- **detail** the deatils of operation
- **query** the prototype of query, it is an empty string when *op* is command
for example:
{ address: { country: "China", city: "Beijing" } } => { address.country, address.city }
{ ts: { $gt: 1411029300, $lt: 1411029302 } => { ts.$gt, ts.$lt }
it's convenient to statistics the similar slow queries with the same prototype and build indexes
- **ms** time used, unit: millisecond
- **nscanned** number of documents scanned
- **nmatched** number of documents matched
- **nmodified** number of documents modified
- **reslen** response length## Support
- MongoDB v2.4
- MongoDB v2.6
- MongoDB v3.0