2017 © Pedro Peláez
 

silex-application mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

image

jmikola/mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

  • Monday, July 24, 2017
  • by jmikola
  • Repository
  • 20 Watchers
  • 170 Stars
  • 843 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 21 Forks
  • 7 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

mongoqp

mongoqp is a frontend for MongoDB's query profiler collections (i.e. db.system.profile), built using Silex and MongoDB PHP Library., (*1)

It currently supports:, (*2)

  • Toggling query profiler levels (off, slow, all) per database
  • Grouping similar queries by BSON structure
  • Reporting aggregate query statistics (min, max, average, times)
  • Sorting, pagination and filtering via DataTables

Future plans:, (*3)

  • Control over slow query thresholds
  • Improving analytics
  • Persistent data collection

Screenshots

Server view, (*4)

Database view, (*5)

Setup

Installation

Dependencies are managed with Composer, a PHP package manager. This project is also published as a package, which means it can be installed with:, (*6)

$ composer create-project jmikola/mongoqp

Configuration

The src/ directory includes a config.php.dist file, which may be copied to config.php and customized. If config.php is not present, the default configuration will be included., (*7)

Currently, the following options are available:, (*8)

  • debug: Enable verbose error reporting
  • mongodb.client.uri: MongoDB connection URI string
  • mongodb.client.uriOptions: MongoDB connection URI options
  • mongodb.client.driverOptions: MongoDB driver options
  • twig.cache_dir: Cache directory for Twig templates

Database Connection

By default, the application will connect to a standalone MongoDB server on the local host (i.e. new MongoDB\Client). The connection may be customized via the mongodb.client options, like so:, (*9)

$app['mongodb.client.uri'] = 'mongodb://example.com:27017';

The above example connects to a standalone server by its hostname. Consult the MongoDB PHP library documentation for additional examples on connecting to a replica set or specifying auth credentials., (*10)

Database profiling cannot be enabled on mongos instances. If you are profiling queries in a sharded cluster, the application should be configured to connect to an individual shard., (*11)

Cache Directory

By default, the application will use mongoqp-cache/ within the system's temporary directory. This path, which must be writable, may be customized via the twig.cache_dir configuration option., (*12)

Web Server

The application can be started using:, (*13)

$ php -S localhost:8080 -t web

Instructions for other web server configurations are outlined in the Silex documentation., (*14)

The Versions

24/07 2017

dev-master

9999999-dev https://github.com/jmikola/mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

  Sources   Download

MIT

The Requires

 

mongodb database profiling

24/07 2017

v1.1.1

1.1.1.0 https://github.com/jmikola/mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

  Sources   Download

MIT

The Requires

 

mongodb database profiling

21/06 2017

v1.1.0

1.1.0.0 https://github.com/jmikola/mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

  Sources   Download

MIT

The Requires

 

mongodb database profiling

26/03 2013

v1.0.0

1.0.0.0 https://github.com/jmikola/mongoqp

MongoQP is a frontend for MongoDB's query profiler collection.

  Sources   Download

MIT

The Requires

 

mongodb database profiling