1.0.3 • Published 8 years ago
mongodb-serverstatus v1.0.3
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 connectionsmemory – {object}
: RAM and virtual memory used in MBflushAvgTime – {number}
: the average time in milliseconds for each flush to disklastFlushTime – {number}
: time in milliseconds for the last flushrawData – {object}
: all mongo serverStatus infosstatus – {bool}
: request statusstorageEngine – {string}
: storage engine useduptime – {int}
: the number of seconds that the current MongoDB process has been active