Class: Fluent::Plugin::JournalInput

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

Overview

Fluentd plugin for reading from the systemd journal files

Constant Summary collapse

DEFAULT_STORAGE_TYPE =
'local'

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



38
39
40
41
42
43
44
# File 'lib/fluent/plugin/in_journal.rb', line 38

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



46
47
48
49
# File 'lib/fluent/plugin/in_journal.rb', line 46

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