Class: LogStash::Filters::Syslog_pri

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/filters/syslog_pri.rb

Overview

Filter plugin for logstash to parse the PRI field from the front of a Syslog (RFC3164) message. If no priority is set, it will default to 13 (per RFC).

This filter is based on the original syslog.rb code shipped with logstash.

Constant Summary

Constants inherited from Base

Base::RESERVED

Constants included from Config::Mixin

Config::Mixin::CONFIGSORT

Instance Attribute Summary

Attributes included from Config::Mixin

#config, #original_params

Attributes inherited from Plugin

#logger, #params

Instance Method Summary collapse

Methods inherited from Base

#execute, #initialize, #threadsafe?

Methods included from Config::Mixin

#config_init, included

Methods inherited from Plugin

#eql?, #finished, #finished?, #hash, #initialize, #inspect, lookup, #reload, #running?, #shutdown, #teardown, #terminating?, #to_s

Constructor Details

This class inherits a constructor from LogStash::Filters::Base

Instance Method Details

#filter(event) ⇒ Object



69
70
71
72
73
# File 'lib/logstash/filters/syslog_pri.rb', line 69

def filter(event)
  return unless filter?(event)
  parse_pri(event)
  filter_matched(event)
end

#registerObject



64
65
66
# File 'lib/logstash/filters/syslog_pri.rb', line 64

def register
  # Nothing
end