Another.js MongoDb Internet Driver
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


AMID - Another.js Mongo Internet Driver


Node.js REST interface for MongoDB, we modified mongodb-rest ( to manage more operation:

  • counting elements
  • "distinct" operations
  • excel/csv export
  • list of available db collection
  • list of keys of a specific query
  • Multithreading support

It's now also possible to search by date range and are managed sort operations. On this link there is an availabe a GUI that use AMID to query data over mongo collections:



Installation is now via npm: npm install amid. After that you can just issue amid-rest on the command line and the server should start.

Realtime monitoring with Nagios, MongoDB and AMID Rest Interface

Here is shown an example of a monitoring system that integrate Nagios, MongoDB and AMID Rest Interface, to have a realtime monitoring of both services and application logs.

Application's datas arrives on MongoDB thanks to TD-Agent that is a service that can send logs data from file directly to a Mongo instance. Datas in Mongo collections are exposed through a rest interface with AMID.

Nagios queries services status with the NRPE client - or with ssh remote commands - installed on monitored servers, and the status of the applications with AMID, searching every minute errors in the differents Mongo collections.

The resulting status of services and applications is sent to a Grafite server to have realtime graphing on Grafana, while the collected logs are available for searching thanks to a web application (AMID GUI).

The follows is a partial list of the involved components:


Supported REST requests:

  • GET /db/collection - Returns all documents
  • GET /db/collection?query=%7B%22isDone%22%3A%20false%7D - Returns all documents satisfying query
  • GET /db/collection?query=%7B%22isDone%22%3A%20false%7D&limit=2&skip=2 - Ability to add options to query (limit, skip, etc)
  • GET /db/collection/id - Returns document with id
  • GET db - List all collection/document
  • GET /db/collection/?operation=key - List all key of collection
  • GET /db/collection/?operation=excel&query=%7B%22isDone%22%3A%20false%7D - export query in excel
  • GET /db/collection/?sort=[{"property":null,"direction":"ASC"}] - Returns all document soted by ASC
  • GET /db/collection?query=%7B%22isDone%22%3A%20false%7D&operation=count - Count elements
  • GET /db/collection?operation=distinct&fields=Market&sort=[{"property":null,"direction":"ASC"}] - Distinct and sort operation
  • GET /db/collection/?sort={"creationDate":-1}&skip=100&limit=100 - Example to sort by the field "creationdate", -1 is for ASC sorts, 1 means DESC sorts
  • POST /db/collection - Insert new document in collection (document in POST body)
  • PUT /db/collection/id - Update document with id (updated document in PUT body)
  • DELETE /db/collection/id - Delete document with id

Content Type:

  • Please make sure application/json is used as Content-Type when using POST/PUT with request body's.


  • "express": "~4.0.0",
  • "morgan": "~1.0.0",
  • "body-parser": "~1.0.0",
  • "method-override": "~1.0.0",
  • "mongodb": "~1.4.0",
  • "jade": "~1.9.4",
  • "log4js": "~0.6.0",
  • "excel-export": "~0.4.0"



  • Mariano Fiorentino
  • Andrea Negro