inputsyslog

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Syslog

type Syslog struct {
	Address            string // Address to receive logs from agents, eg. [tcp/udp]://[host]:[port].
	MaxConnections     int    // Max connections, for TCP only.
	TimeoutSeconds     int    // The number of seconds of inactivity before a remote connection is closed.
	MaxMessageSize     int    // Maximum size of message in bytes received over transport protocol.
	KeepAliveSeconds   int    // The number of seconds to set up keep-alive, for TCP only.
	ParseProtocol      string // ["", rfc3164, rfc5424, auto], empty means no parser.
	IgnoreParseFailure bool   // When parse failure happened, ignore error and set content field if it is set.
	AddHostname        bool   // When listen unixgram from /dev/log, the hostname field is not included in the log, so use rfc3164 will cause parse error, so AddHostname give parser it's own hostname, then parser can parse tag, program, content field currently.

	io.Closer
	// contains filtered or unexported fields
}

Syslog is a service input plugin to collect syslog. It works with syslog agents, such as rsyslog. It uses TCP or UDP to receive syslog from agents, and then parses them with parsers specified by users. It allows users to offer ParseFailField, if a failure happened in parsing pharse, it can stop parse and copy whole data to specify field, and returns to caller.

func (*Syslog) Collect

func (s *Syslog) Collect(collector ilogtail.Collector) error

Collect ...

func (*Syslog) Description

func (s *Syslog) Description() string

Description ...

func (*Syslog) Init

func (s *Syslog) Init(context ilogtail.Context) (int, error)

Init ...

func (*Syslog) Start

func (s *Syslog) Start(collector ilogtail.Collector) error

Start ...

func (*Syslog) Stop

func (s *Syslog) Stop() error

Stop ...

Jump to

Keyboard shortcuts

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