# good-hapi-graylog2

> Graylog GELF broadcasting for Good process monitor

Latest version **3.0.0** (published 2023-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install good-hapi-graylog2
pnpm add good-hapi-graylog2
yarn add good-hapi-graylog2
bun add good-hapi-graylog2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2023-06-06 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.0.0 |
| Dependencies | 3 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | gLeip |
| Maintainers | gleip |

## Links

- npm: https://www.npmjs.com/package/good-hapi-graylog2
- Repository: https://github.com/gleip/good-hapi-graylog2
- Homepage: https://github.com/gleip/good-hapi-graylog2#readme
- Issues: https://github.com/gleip/good-hapi-graylog2/issues
- npm.io page: https://npm.io/package/good-hapi-graylog2

## Dependencies (3)

- [stream](https://npm.io/package/stream.md) 0.0.2
- [gelf-pro](https://npm.io/package/gelf-pro.md) ^1.2.2
- [circular-json](https://npm.io/package/circular-json.md) ^0.3.3

## Recent versions

- 3.0.0 (latest) — 2023-06-06
- 2.1.0 — 2023-06-05
- 2.0.1 — 2023-06-05
- 2.0.0 — 2023-06-02
- 1.2.0 — 2023-04-13
- 1.1.0 — 2018-01-31
- 1.0.4 — 2017-11-21
- 1.0.3 — 2017-08-29
- 1.0.2 — 2017-08-14
- 1.0.1 — 2017-07-25
- 1.0.0 — 2017-07-20

## README

# good-hapi-graylog2
_Good Reporter For Graylog2_

__Hapi:__ http://hapijs.com/

__Good:__ https://github.com/hapijs/good

__Graylog2:__ https://www.graylog.org/



## Usage:

_npm install good-hapi-graylog2_

```
const Good = require('good');
const Hapi = require('hapi');
const pino = require('pino')();

const server = new Hapi.Server();
server.connection({ port: <your_port> });

const goodOptions = {
  includes: {
    request: ['headers'],
    response: ['payload'],
  },
  reporters: {
    logstash: [{
      module: 'good-squeeze',
      name: 'Squeeze',
      args: [{ response: '*', request: '*' }],
    }, {
      module: 'good-hapi-graylog2',
      args: [{
        host: '<graylog server ip>',
        port: '<graylog server port>',
        facility: '<your service name>',
        hostname: '<your host>',
        bufferSize: '<your buffer size>' // optional, default 1400
        adapter: '<protocol udp or tcp>' // optional, default udp
      }],
    }],
  },
};
try {
  server.register([{
      register: good,
      options: goodOptions,
    }], async () => {

    const start = await server.start();
    if (start instanceof Error) throw new Error('Ошибка запуска сервера');

    pino.info('Server running at:', server.info.uri);
  });
} catch((error) => {
  pino.error(error.message)
})

```

## Graylog Setup:
This module requires a _GELF_UDP_ input to be configured on your graylog server.

---
_Source: https://npm.io/package/good-hapi-graylog2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
