Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mongo-statsd-backend
Advanced tools
This is a pluggable backend for StatsD, which publishes stats to mongodb.
This backend uses Mongo's capped collections to have near file system performance for logging data points from StatsD.
$ npm install mongo-statsd-backend
Inside of your StatsD server config file, use the following parameters:
{
mongoHost: 'user:pass@localhost',
mongoPort: 27017,
mongoMax: 2160,
mongoPrefix: true,
mongoName: 'databaseName',
backends: ['/path/to/module/lib/index.js']
}
mongoHost
: the ip address or hostname of the mongo server. Default is localhost
.mongoMax
: the number of data points to cap the collection with. Default is 2160
. With Statsd's default of 10 seconds, this gives 6 hours of 'near real-time' data.mongoPrefix
: Boolean. If true, then the statsd "bucket" names contain a prefix which deterine the database name. For example, if a counter is called 'web-server.page_hits' then the database name will be 'web-server' and the collection name will be 'page_hits'. Otherwise, the database name will be 'statsd' and the collection name will be 'web-server.page_hits'.The schema follows the StatsD namespace.
database.collection.tite.flush_rate
bucket.metric.metric_title_flushrate
db.counters
{
time: 1234567890, // time_stamp from statsd
count: 124 // Integer from statsd
}
db.timers
{
time: 1234567890, // time_stamp from statsd
durations: [0, 1, 2] // Array from statsd
}
db.timer_data
{
time: 1234567890, // time_stamp from statsd
mean_90: 1.1764705882352942,
upper_90: 3,
sum_90: 80,
std: 60.18171889277414,
upper: 526,
lower: 0,
count: 75,
count_ps: 7.5,
sum: 652,
mean: 8.693333333333333,
median: 1
}
db.sets
{
time: 1234567890, // time_stamp from statsd
set: ['name1', 'name2'] // Array from statsd
}
FAQs
A backend for StatsD to emit stats to mongodb.
We found that mongo-statsd-backend 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.