splunk

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogSplunk

type LogSplunk struct {
	Logger     string `json:"logger"`
	Severity   string `json:"serverity"`
	Header     string `json:"header,omitempty"`
	Status     int    `json:"status"`
	Client     string `json:"client"`
	Latency    string `json:"latency"`
	LatencyInt int64  `json:"latencyMicro"`
	Method     string `json:"method"`
	Path       string `json:"path"`
	Error      string `json:"error,omitempty"`
}

type SplunkLog

type SplunkLog struct {
	Event      string `json:"event"`
	SourceType string `json:"sourcetype"`
	Source     string `json:"-"`
	Index      string `json:"-"`
}

SplunkLog represents the structure of a log event sent to Splunk.

type SplunkLogger

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

SplunkLogger is a logger that sends logs to Splunk.

func CheckIfSplunkIsWorking

func CheckIfSplunkIsWorking(params *libParams.SplunkParams) (*SplunkLogger, error)

checkIfSplunkIsWorking tests the Splunk connection by sending a test log.

func (SplunkLogger) Write

func (j SplunkLogger) Write(p []byte) (n int, err error)

Write sends a log message to Splunk async.

Jump to

Keyboard shortcuts

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