npm: npm install @hapi/oppsy

yarn: yarn add @hapi/oppsy


const Hapi = require('@hapi/hapi');
const Oppsy = require('@hapi/oppsy');

const server = new Hapi.Server();
const oppsy = new Oppsy(server);
oppsy.on('ops', (data) => {

await server.start();


This creates a new Oppsy object and starts collecting information every 1000 miliseconds

new Oppsy(server, [config])

Creates a new Oppsy object.

  • server - the hapi server to collect information about.
  • [config] - optional configuration object
    • httpAgents - the list of httpAgents to report socket information about. Can be a single http.Agent or an array of agents objects. Defaults to Http.globalAgent.
    • httpsAgents - the list of httpsAgents to report socket information about. Can be a single https.Agent or an array of agents. Defaults to Https.globalAgent.

The oppsy object is an EventEmitter so it exposes the same API(.on and .emit) as the Node EventEmitter object. After it is started, it emits an "ops" event after a set interval with the collected ops information as the event payload.


Starts an Oppsy object collecting network and server information.

  • interval - number of milliseconds to wait between each data sampling.


Stops an Oppsy objects collecting.


Update deps
Add missing namespace to hoek dependency
Change module namespace
Update Hoek and dev dependencies
Add cpu process information. Closes #7
Migrate to node 8 and async/await
Fix httpAgent reference assignment
Test on node v6, update dependencies
Fixes #2.
Bind networkMonitor to _tasks.
TypeError: Cannot read property 'connections' of undefined