Skip to content

mpeperos/good

 
 

Repository files navigation

good Logo

hapi process monitoring

Build StatusCurrent Version

Lead Maintainer: Open position

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.

Version compatibility

hapi v16 - good v7

hapi v17 - good v8

Example Usage

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

const options = {
    ops: {
        interval: 1000
    },
    reporters: {
        myConsoleReporter: [
            {
                module: 'good-squeeze',
                name: 'Squeeze',
                args: [{ log: '*', response: '*' }]
            },
            {
                module: 'good-console'
            },
            'stdout'
        ]
    }
};

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

await server.start();

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

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

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.

About

hapi process monitoring

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%