Socket
Socket
Sign inDemoInstall

mongodb-serverstatus

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mongodb-serverstatus

Library to get MongoDB serverStatus informations


Version published
Maintainers
1
Install size
7.36 kB
Created

Readme

Source

Mongo serverStatus

Node.js library to get MongoDB serverStatus informations.

Usage exemple

Install with npm install mongodb-serverstatus and you're ready to go!

const serverStatus = require('mongodb-serverstatus');

var config = {
    dbPath: 'mongodb://localhost/mydatabase',
    dbOptions: {
        user: '',
        pass: '',
        server: {
            ssl: false,
            sslValidate: false
        },
    }
};

serverStatus.init(config);
serverStatus.memory((data) => {
    console.log(data);
});

Functions

  • usedConnections – {number}: percentage of open connections
  • memory – {object}: RAM and virtual memory used in MB
  • flushAvgTime – {number}: the average time in milliseconds for each flush to disk
  • lastFlushTime – {number}: time in milliseconds for the last flush
  • rawData – {object}: all mongo serverStatus infos
  • status – {bool}: request status
  • storageEngine – {string}: storage engine used
  • uptime – {int}: the number of seconds that the current MongoDB process has been active

Keywords

FAQs

Last updated on 04 Jul 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc