Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
/ pino-logstash Public archive

🌲 Pino transport to log data into Logstash via HTTP, TCP, or UDP.

License

Notifications You must be signed in to change notification settings

noel-archive/pino-logstash

Repository files navigation

🌲 Pino Transport for Logstash

Pino transport to log data into Logstash via HTTP, TCP, or UDP.

@noelware/pino-logstash is a library to pipe Pino into a Logstash instance using the HTTP input plugin, TCP input plugin, or UDP input plugin.

Usage

import { createTcpTransport, createUdpTransport, createHttpTransport } from '@noelware/pino-logstash';
import pino from 'pino';

const log = pino({ level: 'info' }, [
  {
    stream: createTcpTransport({
      host: 'localhost',
      port: 4040
    })
  },
  {
    stream: createUdpTransport({
      host: 'localhost',
      port: 6654
    })
  },
  {
    stream: createHttpTransport({
      host: 'localhost',
      port: 9210,
      sername: 'myuser',
      password: 'mypass'
    })
  }
]);

At the moment, using SSL with the HTTP input plugin via @noelware/pino-transport is not supported.

License

@noelware/pino-transport is released under the MIT License by Noelware.