fastify-graylog-reporter
TypeScript icon, indicating that this package has built-in type declarations

1.14.0 • Public • Published

Fastify plugin for report request data to Graylog (GELF)

npm

NPM

Graylog Setup:

This module requires a GELF_UDP input to be configured on your graylog server.

Usage

  1. Declare the input on Graylog WEB UI (support only UDP GELF)
  2. Install plugin with npm i fastify-graylog-reporter
  3. Use.
import { fastifyGrayLogReporter } from 'fastify-graylog-reporter';
/**
 * Register plugin
 */

fastify.register(fastifyGrayLogReporter, {
  host: 'my host',
  /**
   * optional value
   */
  port: 5555,
  /**
   * stream name
   */
  facility: `API_${process.env.ENVIRONMENT}`,
  /**
   * keys for exclude report (type ExcludeKeys[])
   */
  excludeFields: [],

  /**
   * For debug
   */
  logs: true,

});

In progress

  • tcp transport

Package Sidebar

Install

npm i fastify-graylog-reporter

Weekly Downloads

83

Version

1.14.0

License

MIT

Unpacked Size

146 kB

Total Files

32

Last publish

Collaborators

  • blynskyniki
  • alexandrmrk