good

Server and process monitoring plugin

This module has moved and is now available at @hapi/good. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
Last updated a year ago by hueniverse .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install good 
SYNC missed versions from official npm registry.

good Logo

hapi process monitoring

Build StatusCurrent Version

Lead Maintainer: Open position

good 8 only supports hapi 17+ for hapi 16 please use good 7

good is a hapi plugin to monitor and report on a variety of hapi server events as well as ops information from the host machine. It listens for events emitted by hapi server instances and pushes standardized events to a collection of streams.

Example Usage

const Hapi = require('hapi');
const server = new Hapi.Server();

const options = {
    ops: {
        interval: 1000
    },
    reporters: {
        myConsoleReporter: [{
            module: 'good-squeeze',
            name: 'Squeeze',
            args: [{ log: '*', response: '*' }]
        }, {
            module: 'good-console'
        }, 'stdout'],
        myFileReporter: [{
            module: 'good-squeeze',
            name: 'Squeeze',
            args: [{ ops: '*' }]
        }, {
            module: 'good-squeeze',
            name: 'SafeJson'
        }, {
            module: 'good-file',
            args: ['./test/fixtures/awesome_log']
        }],
        myHTTPReporter: [{
            module: 'good-squeeze',
            name: 'Squeeze',
            args: [{ error: '*' }]
        }, {
            module: 'good-http',
            args: ['http://prod.logs:3000', {
                wreck: {
                    headers: { 'x-api-key': 12345 }
                }
            }]
        }]
    }
};

await server.register({
    plugin: require('good'),
    options,
});

await server.start();

console.info(`Server started at ${ server.info.uri }`);

This example does the following:

  1. Sets up the reporter named myConsoleReporter listening for 'response' and 'log' events and writes them to process.stdout.
  2. Sets up the reporter named myFileReporter to listen for 'ops' events and logs them to ./test/fixtures/awesome_log.
  3. Sets up the reporter named myHTTPReporter to listen for error events and POSTs them to http://prod.logs:3000 with additional settings to passed into Wreck

See the Reporter Interface section of the API documentation on how to configure reporters.

NOTE: Ensure calling server.connection prior to registering Good. request and response event listeners are only registered on connections that exist on server at the time Good is registered.

Looking for more examples? Check out the examples folder.

Existing streams

The following streams are maintained by the hapi community and are known to work with good. Any transform or write stream can work with good, these are just a few inside the hapijs organization.

API

See the API Reference.

Current Tags

  • 8.1.2                                ...           latest (a year ago)

95 Versions

  • 8.1.2 [deprecated]           ...           a year ago
  • 8.1.1 [deprecated]           ...           2 years ago
  • 8.1.0 [deprecated]           ...           2 years ago
  • 8.0.1 [deprecated]           ...           2 years ago
  • 8.0.0 [deprecated]           ...           2 years ago
  • 8.0.0-rc1 [deprecated]           ...           3 years ago
  • 7.3.0 [deprecated]           ...           3 years ago
  • 7.2.0 [deprecated]           ...           3 years ago
  • 7.1.0 [deprecated]           ...           4 years ago
  • 7.0.2 [deprecated]           ...           4 years ago
  • 7.0.1 [deprecated]           ...           4 years ago
  • 7.0.0 [deprecated]           ...           4 years ago
  • 6.6.3 [deprecated]           ...           4 years ago
  • 6.6.2 [deprecated]           ...           4 years ago
  • 6.6.1 [deprecated]           ...           4 years ago
  • 7.0.0-rc1 [deprecated]           ...           4 years ago
  • 6.6.0 [deprecated]           ...           4 years ago
  • 6.5.0 [deprecated]           ...           4 years ago
  • 6.4.0 [deprecated]           ...           5 years ago
  • 6.3.0 [deprecated]           ...           5 years ago
  • 6.2.0 [deprecated]           ...           5 years ago
  • 6.1.4 [deprecated]           ...           5 years ago
  • 6.1.3 [deprecated]           ...           5 years ago
  • 6.1.2 [deprecated]           ...           5 years ago
  • 6.1.1 [deprecated]           ...           5 years ago
  • 6.1.0 [deprecated]           ...           5 years ago
  • 6.0.0 [deprecated]           ...           5 years ago
  • 5.1.2 [deprecated]           ...           5 years ago
  • 5.1.1 [deprecated]           ...           6 years ago
  • 5.1.0 [deprecated]           ...           6 years ago
  • 5.0.0 [deprecated]           ...           6 years ago
  • 5.0.0-rc1 [deprecated]           ...           6 years ago
  • 4.0.2 [deprecated]           ...           6 years ago
  • 4.0.1 [deprecated]           ...           6 years ago
  • 2.5.1 [deprecated]           ...           6 years ago
  • 4.0.0 [deprecated]           ...           6 years ago
  • 3.1.1 [deprecated]           ...           6 years ago
  • 2.5.0 [deprecated]           ...           6 years ago
  • 2.4.2 [deprecated]           ...           6 years ago
  • 3.1.0 [deprecated]           ...           6 years ago
  • 3.0.1 [deprecated]           ...           6 years ago
  • 2.3.0 [deprecated]           ...           6 years ago
  • 2.2.3 [deprecated]           ...           6 years ago
  • 2.2.1 [deprecated]           ...           6 years ago
  • 2.2.0 [deprecated]           ...           6 years ago
  • 2.1.2 [deprecated]           ...           6 years ago
  • 2.1.1 [deprecated]           ...           6 years ago
  • 2.1.0 [deprecated]           ...           6 years ago
  • 2.0.0 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           7 years ago
  • 0.12.3 [deprecated]           ...           7 years ago
  • 0.12.2 [deprecated]           ...           7 years ago
  • 0.12.1 [deprecated]           ...           7 years ago
  • 0.12.0 [deprecated]           ...           7 years ago
  • 0.11.1 [deprecated]           ...           7 years ago
  • 0.11.0 [deprecated]           ...           7 years ago
  • 0.10.0 [deprecated]           ...           7 years ago
  • 0.9.0 [deprecated]           ...           7 years ago
  • 0.8.1 [deprecated]           ...           7 years ago
  • 0.8.0 [deprecated]           ...           7 years ago
  • 0.7.0 [deprecated]           ...           7 years ago
  • 0.6.3 [deprecated]           ...           7 years ago
  • 0.6.2 [deprecated]           ...           7 years ago
  • 0.6.0 [deprecated]           ...           7 years ago
  • 0.5.16 [deprecated]           ...           7 years ago
  • 0.5.15 [deprecated]           ...           7 years ago
  • 0.5.14 [deprecated]           ...           7 years ago
  • 0.5.13 [deprecated]           ...           7 years ago
  • 0.5.12 [deprecated]           ...           7 years ago
  • 0.5.11 [deprecated]           ...           7 years ago
  • 0.5.10 [deprecated]           ...           7 years ago
  • 0.5.9 [deprecated]           ...           7 years ago
  • 0.5.8 [deprecated]           ...           7 years ago
  • 0.5.7 [deprecated]           ...           7 years ago
  • 0.5.6 [deprecated]           ...           7 years ago
  • 0.5.5 [deprecated]           ...           7 years ago
  • 0.5.4 [deprecated]           ...           7 years ago
  • 0.5.3 [deprecated]           ...           7 years ago
  • 0.5.2 [deprecated]           ...           7 years ago
  • 0.5.1 [deprecated]           ...           7 years ago
  • 0.5.0 [deprecated]           ...           7 years ago
  • 0.4.0 [deprecated]           ...           7 years ago
  • 0.3.0 [deprecated]           ...           7 years ago
  • 0.2.0 [deprecated]           ...           7 years ago
  • 0.1.8 [deprecated]           ...           7 years ago
  • 0.1.7 [deprecated]           ...           7 years ago
  • 0.1.6 [deprecated]           ...           7 years ago
  • 0.1.5 [deprecated]           ...           7 years ago
  • 0.1.4 [deprecated]           ...           7 years ago
  • 0.1.3 [deprecated]           ...           7 years ago
  • 0.1.2 [deprecated]           ...           7 years ago
  • 0.1.1 [deprecated]           ...           7 years ago
  • 0.1.0 [deprecated]           ...           7 years ago
  • 0.0.2 [deprecated]           ...           7 years ago
  • 0.0.1 [deprecated]           ...           7 years ago
Maintainers (1)
Downloads
Today 101
This Week 504
This Month 618
Last Day 4
Last Week 137
Last Month 911
Dependencies (4)
Dev Dependencies (4)
Dependents (241)

Copyright 2014 - 2016 © taobao.org |