Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
mongomon is a MongoDB server status monitor written for node.js.
The current version is a wrapper around the several mongo diagnostic commands that are available in the mongo shell, that converts the output from BSON to JSON format.
This can be used to monitor the mongos shard router, or mongod instances.
mongomon.start() is used to start the interval that monitors the server statistics. The methods to get database stats and collection stats are not meant to be run very often, therefore, they do not run on the interval when mongomon.start() is called, and have to be called manually.
For example, you can run this to monitor each mongos and mongod process in your cluster every 60 seconds, but only run the database stats and collection stats once or twice a day.
var Mongomon = require('./index');
var mongomon = new Mongomon({interval: 5000, url: 'localhost:27017/mydatabase'});
mongomon.on('serverStatus', function(data){
console.log('server stats:',JSON.stringify(data));
console.log();
});
mongomon.on('dbstat', function(data){
console.log('db stats:',JSON.stringify(data));
console.log();
});
mongomon.on('collstat', function(data){
console.log('collection stats:',JSON.stringify(data));
console.log();
});
//start calling db.serverStatus() on the provided interval
mongomon.start();
//get database statistics once
mongomon.getDBStats();
//get collection statistics once (for each collection in the database)
mongomon.getCollStats();
FAQs
A mongodb monitor written for node.js
The npm package mongomon receives a total of 2 weekly downloads. As such, mongomon popularity was classified as not popular.
We found that mongomon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.