syslog

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name     = "syslog"
	Version  = "v0.0.0"
	CommitID = ""
)
View Source
var DefaultReceiverConfig = ReceiverConfig{
	Port: "7531",
}

Functions

func NewPlugin

func NewPlugin() (*pkgplugin.Plugin, error)

func NewPluginVersion

func NewPluginVersion(name string, version string, commitID string) (*pkgplugin.Plugin, error)

func NewReceiver

func NewReceiver(tid tenant.Id, plugin string, name string, config interface{}, secrets secret.Vault, tableSyncer syncer.DeltaSyncer) (receiver.Receiver, error)

Types

type Facility

type Facility int
const (
	KernelMessages Facility = iota << 3
	UserLevelMessages
	MailSystem
	SystemDaemons
	SecurityOrAuthorizationMessages
	MessagesGeneratedInternallyBySyslogd
	LinePrinterSubsystem
	NetworkNewsSubsystem
	UUCPSubsystem
	ClockDaemon
	SecurityOrAuthorizationMessages2
	FTPDaemon
	NTPSubsystem
	LogAudit
	LogAlert
	ClockDaemon2
	LocalUse0
	LocalUse1
	LocalUse2
	LocalUse3
	LocalUse4
	LocalUse5
	LocalUse6
	LocalUse7
)

type Receiver

type Receiver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Receiver) Config

func (r *Receiver) Config() interface{}

func (*Receiver) EventErrorCount added in v1.1.2

func (r *Receiver) EventErrorCount() int

func (*Receiver) EventErrorVelocity added in v1.1.2

func (r *Receiver) EventErrorVelocity() int

func (*Receiver) EventSuccessCount added in v1.1.2

func (r *Receiver) EventSuccessCount() int

func (*Receiver) EventSuccessVelocity added in v1.1.2

func (r *Receiver) EventSuccessVelocity() int

func (*Receiver) EventTs added in v1.1.2

func (r *Receiver) EventTs() int64

func (*Receiver) Hash added in v1.1.2

func (r *Receiver) Hash() string

func (*Receiver) LogSuccess added in v1.1.2

func (r *Receiver) LogSuccess()

func (*Receiver) Name

func (r *Receiver) Name() string

func (*Receiver) Plugin

func (r *Receiver) Plugin() string

func (*Receiver) Receive

func (r *Receiver) Receive(next receiver.NextFn) error

func (*Receiver) StopReceiving

func (r *Receiver) StopReceiving(ctx context.Context) error

func (*Receiver) Tenant

func (r *Receiver) Tenant() tenant.Id

func (*Receiver) Trigger

func (r *Receiver) Trigger(e event.Event)

type ReceiverConfig

type ReceiverConfig struct {
	Port string `json:"port"`
}

func (*ReceiverConfig) Validate

func (rc *ReceiverConfig) Validate() error

Validate returns an error upon validation failure

func (*ReceiverConfig) WithDefaults

func (rc *ReceiverConfig) WithDefaults() ReceiverConfig

WithDefaults returns a new config object that has all of the unset (nil) values filled in.

type Severity

type Severity int
const (
	Emergency Severity = iota
	Alert
	Critical
	Error
	Warning
	Notice
	Informational
	Debug
)

type SyslogMessage

type SyslogMessage struct {
	Facility int    `json:"facility"`
	Severity int    `json:"severity"`
	Hostname string `json:"hostname"`
	Message  string `json:"message"`
}

type SyslogServer

type SyslogServer struct {
	Addr string
	// contains filtered or unexported fields
}

func NewSyslogServer

func NewSyslogServer(addr string) *SyslogServer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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