syslog

package
v2.1.1-0...-c609277 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics holds a set of syslog metrics.

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

NewMetrics creates a new set of syslog metrics. If reg is non-nil, the metrics will be registered.

type SyslogTarget

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

SyslogTarget listens to syslog messages. nolint:golint

func NewSyslogTarget

func NewSyslogTarget(
	metrics *Metrics,
	logger log.Logger,
	handler api.EntryHandler,
	relabel []*relabel.Config,
	config *scrapeconfig.SyslogTargetConfig,
) (*SyslogTarget, error)

NewSyslogTarget configures a new SyslogTarget.

func (*SyslogTarget) Details

func (t *SyslogTarget) Details() interface{}

Details returns target-specific details.

func (*SyslogTarget) DiscoveredLabels

func (t *SyslogTarget) DiscoveredLabels() model.LabelSet

DiscoveredLabels returns the set of labels discovered by the syslog target, which is always nil. Implements Target.

func (*SyslogTarget) Labels

func (t *SyslogTarget) Labels() model.LabelSet

Labels returns the set of labels that statically apply to all log entries produced by the SyslogTarget.

func (*SyslogTarget) ListenAddress

func (t *SyslogTarget) ListenAddress() net.Addr

ListenAddress returns the address SyslogTarget is listening on.

func (*SyslogTarget) Ready

func (t *SyslogTarget) Ready() bool

Ready indicates whether or not the syslog target is ready to be read from.

func (*SyslogTarget) Stop

func (t *SyslogTarget) Stop() error

Stop shuts down the SyslogTarget.

func (*SyslogTarget) Type

func (t *SyslogTarget) Type() target.TargetType

Type returns SyslogTargetType.

type SyslogTargetManager

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

SyslogTargetManager manages a series of SyslogTargets. nolint:golint

func NewSyslogTargetManager

func NewSyslogTargetManager(
	metrics *Metrics,
	logger log.Logger,
	client api.EntryHandler,
	scrapeConfigs []scrapeconfig.Config,
) (*SyslogTargetManager, error)

NewSyslogTargetManager creates a new SyslogTargetManager.

func (*SyslogTargetManager) ActiveTargets

func (tm *SyslogTargetManager) ActiveTargets() map[string][]target.Target

ActiveTargets returns the list of SyslogTargets where syslog data is being read. ActiveTargets is an alias to AllTargets as SyslogTargets cannot be deactivated, only stopped.

func (*SyslogTargetManager) AllTargets

func (tm *SyslogTargetManager) AllTargets() map[string][]target.Target

AllTargets returns the list of all targets where syslog data is currently being read.

func (*SyslogTargetManager) Ready

func (tm *SyslogTargetManager) Ready() bool

Ready returns true if at least one SyslogTarget is also ready.

func (*SyslogTargetManager) Stop

func (tm *SyslogTargetManager) Stop()

Stop stops the SyslogTargetManager and all of its SyslogTargets.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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