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.
chpr-metrics
Advanced tools
This utility library implements our standard statsd configuration
Minimum Node.js version: 4
## Installation
npm install --save chpr-metrics
This simple configuration allows you to send metrics to a single statds server
If you need to send metrics to several destinations, you can use the METRICS_DESTINATIONS variable, which allows you to specify a list of destinations as a JSON array:
Complete example:
[{
"METRICS_HOST": "host1.yourstats.com",
"METRICS_PORT": "1234",
"METRICS_PREFIX": "prefix1.",
"METRICS_SUFFIX": ".suffix1"
}, {
"METRICS_HOST": "your-other-host.com",
"METRICS_PORT": "44444",
"METRICS_PREFIX": "anotherPrefix.",
"METRICS_SUFFIX": ".anotherSuffix"
}]
If you use this in combination with the individual configuration variables listed in the previous sections, it will send metrics to all directions.
'use strict';
const metrics = require('chpr-metrics');
// Timing: sends a timing command with the specified milliseconds
metrics.timing('response_time', 42);
// Increment: Increments a stat by a value (default is 1)
metrics.increment('my_counter');
The exported object is the configured statds client: see https://github.com/sivy/node-statsd
FAQs
Chauffeur Privé's statsd configuration
The npm package chpr-metrics receives a total of 21 weekly downloads. As such, chpr-metrics popularity was classified as not popular.
We found that chpr-metrics 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.