splunk

package module
v0.0.0-...-ad8ea12 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSplunkAdapter

func NewSplunkAdapter(route *router.Route) (router.LogAdapter, error)

NewSplunkAdapter creates an SplunkAdapter

Types

type SplunkAdapter

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

SplunkAdapter is an adapter that POSTs logs to an HTTP endpoint

func (*SplunkAdapter) Stream

func (a *SplunkAdapter) Stream(logstream chan *router.Message)

Stream implements the router.LogAdapter interface

type SplunkMessage

type SplunkMessage struct {
	Time       int64              `json:"time"`
	Source     string             `json:"source"`
	SourceType string             `json:"sourcetype"`
	Index      string             `json:"index"`
	Hostname   string             `json:"host"`
	Event      SplunkMessageEvent `json:"event"`
}

SplunkMessage is a simple JSON representation of the log message.

type SplunkMessageEvent

type SplunkMessageEvent struct {
	Message string            `json:"message"`
	Labels  map[string]string `json:"labels"`
}

Jump to

Keyboard shortcuts

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