Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var env = require('envalid');
var StatsD = require('node-statsd');
var allcontainers = require('docker-allcontainers');
var dockerstats = require('docker-stats');
var _ = require('lodash');
var through = require('through2');
env.validate(process.env, {
STATSD_HOST: {recommended: true},
STATSD_PORT: {recommended: true},
STATSD_PREFIX: {recommended: true},
});
var statsdClient = new StatsD({
host: env.get('STATSD_HOST', '127.0.0.1'),
port: env.get('STATSD_PORT', 8125),
prefix: env.get('STATSD_PREFIX', 'docker.'),
});
/*statsdClient = {
gauge: function(key, value){
console.log(key, value);
}
}*/
var stats = dockerstats({
docker: null,
events: allcontainers({
preheat: true,
docker:null})
});
var env = require('envalid');
var StatsD = require('node-statsd');
var allcontainers = require('docker-allcontainers');
var dockerstats = require('docker-stats');
var _ = require('lodash');
var through = require('through2');
env.validate(process.env, {
STATSD_HOST: {recommended: true},
STATSD_PORT: {recommended: true},
STATSD_PREFIX: {recommended: true},
});
var statsdClient = new StatsD({
host: env.get('STATSD_HOST', '127.0.0.1'),
port: env.get('STATSD_PORT', 8125),
prefix: env.get('STATSD_PREFIX', 'docker.'),
});
/*statsdClient = {
gauge: function(key, value){
console.log(key, value);
}
}*/
var stats = dockerstats({
docker: null,
events: allcontainers({
preheat: true,
docker:null})
});
var StatsD = require('node-statsd');
var allcontainers = require('docker-allcontainers');
var dockerstats = require('docker-stats');
var _ = require('lodash');
var through = require('through2');
env.validate(process.env, {
STATSD_HOST: {recommended: true},
STATSD_PORT: {recommended: true},
STATSD_PREFIX: {recommended: true},
});
var statsdClient = new StatsD({
host: env.get('STATSD_HOST', '127.0.0.1'),
port: env.get('STATSD_PORT', 8125),
prefix: env.get('STATSD_PREFIX', 'docker.'),
});
/*statsdClient = {
gauge: function(key, value){
console.log(key, value);
}
}*/
var stats = dockerstats({
docker: null,
events: allcontainers({
preheat: true,
docker:null})
});
stats.pipe(through.obj(update));