Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

monlog

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monlog

MongoDB logging server & API

Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

monlog

MongoDB log server supporting monquery for human-friendly queries, and regular JSON queries. Built with Koa and requires node 0.11.x.

Installation

$ npm install -g monlog

Usage


  Usage: monlog [options]

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -p, --port <n>  port number [3000]

API

POST /

Create a log entry, expects:

  • timestamp
  • hostname
  • message
  • level
  • type

GET /

Search with monquery support:

GET / level:error AND type:upload

Limit responses with ?limit:

GET /?limit=1 level:error

Filter responses with ?filter:

GET /?limit=1&fields=type,level,hostname level:error

GET /stats

Respond with log stats:

{
  "count": 2041999
}

Capping the logs

To turn your monlog "logs" collection into a capped collection run the following command in mongo's shell:

db.runCommand({ convertToCapped: 'logs', size: 100000 });

License

MIT

Keywords

mongo

FAQs

Package last updated on 06 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts