Skip to content

motomux/mongodb-slow-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongodb-slow-query

A library to tail slow query on MongoDB for Node.js

Install

npm install -S mongodb-slow-query

Usage

var mongoDbSlowQuery = require('mongodb-slow-query');

var watcher = mongoDbSlowQuery.watcher({ url: 'MONGODB_URL' });
watcher.connect(function(err) {
  if (err) {
    console.error(err);
  } else {
    watcher.on('data', function(data) {
      console.info(data);
    });
    watcher.on('end', function() {
      console.info('watcher emits end.');
    });
    watcher.on('close', function() {
      console.error('watcher emits close.');
    });
  }
});

About

A library to tail slow query on MongoDB for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published