winston-splunk-transport

0.3.1 • Public • Published

winston-splunk-transport

A splunk transport for winston. Inspired by winston-greylog2.

Installation

Tested on node-0.6.x and 0.8.x, requires npm & winston.

  $ npm install winston
  $ npm install winston-splunk

Usage

  var winston = require('winston');
  winston.add(require('winston-splunk-transport').splunk, options);

Splunk props.conf

Example props.conf

[udp:54321]
NO_BINARY_CHECK=1
SHOULD_LINEMERGE=false
TIME_PREFIX={"_timestamp":

Options are the following:

  • level: Level of messages this transport should log. (default: info)

  • silent: Boolean flag indicating whether to suppress output. (default: false)

  • type: Log type. (default: application)

  • label: Label for logger. (default: empty)

  • splunkHost: IP address or hostname of the Splunk server. (default: localhost)

  • splunkPort: Port to send messages to on the Splunk server. (default: 54321)

  • splunkHostname: The hostname associated with Splunk messages. (default: require('os').hostname())

  • splunkFacility: The Splunk facility to send log messages.. (default: nodejs)

This fork places the message in the msg field of the log message instead of the type field. It also outputs a log label in the log if one was defined in the Winston logger.

Package Sidebar

Install

npm i winston-splunk-transport

Weekly Downloads

2

Version

0.3.1

License

none

Last publish

Collaborators

  • clandry