splunk

package
v0.5.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

README

splunk HTTP Event Collector output

It sends events to splunk.

Config params

endpoint string required

A full URI address of splunk HEC endpoint. Format: http://127.0.0.1:8088/services/collector.


token string required

Token for an authentication for a HEC endpoint.


workers_count cfg.Expression default=gomaxprocs*4

How many workers will be instantiated to send batches.


request_timeout cfg.Duration default=1s

Client timeout when sends requests to HTTP Event Collector.


batch_size cfg.Expression default=capacity/4

A maximum quantity of events to pack into one batch.


batch_flush_timeout cfg.Duration default=200ms

After this timeout the batch will be sent even if batch isn't completed.



Generated using insane-doc

Documentation

Overview

Package splunk is an output plugin that sends events to splunk database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory() (pipeline.AnyPlugin, pipeline.AnyConfig)

Types

type Config

type Config struct {
	//> @3@4@5@6
	//>
	//> A full URI address of splunk HEC endpoint. Format: `http://127.0.0.1:8088/services/collector`.
	Endpoint string `json:"endpoint" required:"true"` //*

	//> @3@4@5@6
	//>
	//> Token for an authentication for a HEC endpoint.
	Token string `json:"token" required:"true"` //*

	//> @3@4@5@6
	//>
	//> How many workers will be instantiated to send batches.
	WorkersCount  cfg.Expression `json:"workers_count" default:"gomaxprocs*4" parse:"expression"` //*
	WorkersCount_ int

	//> @3@4@5@6
	//>
	//> Client timeout when sends requests to HTTP Event Collector.
	RequestTimeout  cfg.Duration `json:"request_timeout" default:"1s" parse:"duration"` //*
	RequestTimeout_ time.Duration

	//> @3@4@5@6
	//>
	//> A maximum quantity of events to pack into one batch.
	BatchSize  cfg.Expression `json:"batch_size" default:"capacity/4" parse:"expression"` //*
	BatchSize_ int

	//> @3@4@5@6
	//>
	//> After this timeout the batch will be sent even if batch isn't completed.
	BatchFlushTimeout  cfg.Duration `json:"batch_flush_timeout" default:"200ms" parse:"duration"` //*
	BatchFlushTimeout_ time.Duration
}

! config-params ^ config-params

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Out

func (p *Plugin) Out(event *pipeline.Event)

func (*Plugin) Start

func (p *Plugin) Start(config pipeline.AnyConfig, params *pipeline.OutputPluginParams)

func (*Plugin) Stop

func (p *Plugin) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL