Skip to content

itamarbareket/winston-splunk-hec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

winston-splunk-hec

A splunk (over HEC) transport for the winston logging toolkit.

Installation

npm install --save winston winston-splunk-hec

Usage

var winston = require('winston');
var SplunkTrasport = require('winston-splunk-hec');

var TransportOpts = {
  level: 'info',
  splunkUrl: 'https://yoursplunk.company/services/collector',
  splunkHec: '1234-5678-9123-4567',
};
var logger = winston.createLogger({
  transports: [
    new SplunkTrasport(TransportOpts)
  ]
});

Options

  • level [info] Messages logged with a severity greater or equal to the given one are logged to ES; others are discarded.
  • buffering [true] Boolean flag to enable or disable messages buffering. The bufferLimit option is ignored if set to false.
  • bufferLimit [null] Limit for the number of log messages in the buffer.
  • SplunkUrl Url for splunk HEC endopint
  • SplunkHec HEC token

About

A @winstonjs logger transport for splunk HTTP event collector

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published