Class: Fluent::ProcessSnmptrap
- Inherits:
-
Filter
- Object
- Filter
- Fluent::ProcessSnmptrap
- Defined in:
- lib/fluent/plugin/filter_process_snmptrap.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
13 14 15 |
# File 'lib/fluent/plugin/filter_process_snmptrap.rb', line 13 def configure(conf) super end |
#filter(tag, time, record) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/fluent/plugin/filter_process_snmptrap.rb', line 21 def filter(tag, time, record) # Replace invalid characters fixedRecord = Hash.new record.each { |recKey, recValue| newKey = recKey invalidChars.each { |invalidKey, subChar| newKey = newKey.gsub(invalidKey, subChar) } record.delete(recKey) fixedRecord[newKey] = recValue } record.replace(fixedRecord) return record end |
#start ⇒ Object
17 18 19 |
# File 'lib/fluent/plugin/filter_process_snmptrap.rb', line 17 def start super end |