Sha256: cb7511aa2dca7a4f2d185ecb23faecb193c58360f71e295ef0d3fb918da79811

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

module PatronusFati::MessageProcessor::Alert
  include PatronusFati::MessageProcessor

  def self.process(obj)
    PatronusFati.event_handler.event(:alert, :new, process_obj(obj))

    nil
  end

  def self.process_obj(obj)
    {
      created_at: obj[:sec],
      type: obj[:header],
      message: obj[:text],

      source: obj[:source],
      destination: obj[:dest],
      other: obj[:other]
    }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
patronus_fati-0.9.23 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.22 lib/patronus_fati/message_processor/alert.rb
patronus_fati-0.9.21 lib/patronus_fati/message_processor/alert.rb