Class: Fluent::Plugin::SystemdInput

Inherits:
Input
  • Object
show all
Defined in:
lib/fluent/plugin/in_systemd.rb

Overview

Fluentd plugin for reading from the systemd journal

Constant Summary collapse

DEFAULT_STORAGE_TYPE =
'local'

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/fluent/plugin/in_systemd.rb', line 50

def configure(conf)
  super
  @journal = nil
  @pos_storage = storage_create(usage: 'positions')
  @mutator = SystemdEntryMutator.new(**@entry_opts.to_h)
  @mutator.warnings.each { |warning| log.warn(warning) }
end

#startObject



58
59
60
61
# File 'lib/fluent/plugin/in_systemd.rb', line 58

def start
  super
  timer_execute(:in_systemd_emit_worker, 1, &method(:run))
end