native

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

systemdconsumer.go

Requirements

  • linux os
  • systemd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SystemdConsumer

type SystemdConsumer struct {
	core.SimpleConsumer `gollumdoc:"embed_type"`
	// contains filtered or unexported fields
}

SystemdConsumer consumer plugin

NOTICE: This producer is not included in standard builds. To enable it you need to trigger a custom build with native plugins enabled. The systemd consumer allows to read from the systemd journal.

Parameters

- SystemdUnit: This value defines what journal will be followed. This uses journal.add_match with _SYSTEMD_UNIT. If this value is set to "", the filter is disabled. By default this parameter is set to "".

- DefaultOffset: This value defines where to start reading the file. Valid values are "oldest" and "newest". If OffsetFile is defined the DefaultOffset setting will be ignored unless the file does not exist. By default this parameter is set to "newest".

- OffsetFile: This value defines the path to a file that stores the current offset. If the consumer is restarted that offset is used to continue reading. Set this value to "" which disables the offset file. By default this parameter is set to "".

Examples

This example set up a basic systemd consumer:

exampleConsumer:
  Type: native.Systemd
  Streams: "*"
  SystemdUnit: sshd.service

func (*SystemdConsumer) Configure

func (cons *SystemdConsumer) Configure(conf core.PluginConfigReader) error

Configure initializes this consumer with values from a plugin config.

func (*SystemdConsumer) Consume

func (cons *SystemdConsumer) Consume(workers *sync.WaitGroup)

Consume enables systemd forwarding as configured.

Jump to

Keyboard shortcuts

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