nodejs service OFFICIAL v9.0.0

service-syslog-server

service-syslog-server

Syslog server service plugin that receives messages and emits events

syslog server service events

@bsb/syslog

Syslog server and client for BSB - receive syslog messages and send logs to syslog servers.

Installation

npm install @bsb/syslog

Features

Syslog Server

  • Receive syslog messages - UDP/TCP protocols
  • RFC compliance - Supports RFC 3164 and RFC 5424
  • Event emission - Emit received messages as BSB events
  • Client API - Subscribe to syslog messages from other services

Syslog Client (Observable)

  • Send BSB logs to syslog - Forward application logs
  • Multiple protocols - UDP, TCP, TLS support
  • RFC compliance - RFC 3164 and RFC 5424
  • Level filtering - Control which log levels are sent

Configuration

Server Configuration

plugins:
  services:
    - plugin: "@bsb/syslog"
      service: "SyslogServerPlugin"
      enabled: true
      config:
        port: 514
        address: "0.0.0.0"
        exclusive: false

Client (Observable) Configuration

plugins:
  observables:
    - plugin: "@bsb/syslog"
      observable: "SyslogClientPlugin"
      enabled: true
      config:
        host: "localhost"
        port: 514
        protocol: "udp"
        facility: 16
        appName: "my-app"
        rfc: "5424"
        levels:
          debug: true
          info: true
          warn: true
          error: true

Usage

import { 
  SyslogServerPlugin, 
  SyslogServerClient, 
  SyslogClientPlugin 
} from "@bsb/syslog";

License

Dual-licensed under AGPL-3.0-only OR Commercial License.

Installation

Use as a dependency (client reference)
bsb client install service-syslog-server
Deploy as a service
bsb plugin install service-syslog-server
Node.js (npm)
npm install @bsb/syslog

Configuration

Configuration options for this plugin:

port port integer default: 514
address address string default: "0.0.0.0"
exclusive exclusive boolean default: false

Events

Events available to clients of this plugin:

Listen (Fire and Forget)

Events this plugin handles silently.

onMessage fire-and-forget

Syslog message received from client

Receives
gatewayTime double Gateway timestamp (epoch ms)
date double Original syslog timestamp (epoch ms)
host string Source host
protocol string Transport protocol
message string Syslog message content

Available Versions

v9.0.0

Dependencies

No dependencies

Metadata