New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hharnisc/docker-stats

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hharnisc/docker-stats

All your docker containers statistics as a stream

beta
latest
Source
npmnpm
Version
0.9.0-beta-01
Version published
Maintainers
1
Created
Source

docker-stats

Collect all your Docker stats!

Install

npm install docker-stats --save

Usage

var stats = require('docker-stats')
var through = require('through2')
var opts = {
  docker: null, // here goes options for Dockerode
  events: null, // an instance of docker-allcontainers

  statsinterval: 10, // downsample stats. Collect a number of statsinterval logs
                     // and output their mean value

  // the following options limit the containers being matched
  // so we can avoid catching logs for unwanted containers
  matchByName: /hello/, // optional
  matchByImage: /matteocollina/, // optional
  skipByName: /.*pasteur.*/, // optional
  skipByImage: /.*dockerfile.*/ // optional
}
stats(opts).pipe(through.obj(function(chunk, enc, cb) {
  this.push(JSON.stringify(chunk))
  this.push('\n')
  cb()
})).pipe(process.stdout)

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Keywords

docker

FAQs

Package last updated on 27 Oct 2018

Did you know?

Socket

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.

Install

Related posts