Sha256: f10e1ead1c6930f3f3b27ad8500d0684985683dc3eb4b581a62920f8b9bdffa9
Contents?: true
Size: 581 Bytes
Versions: 31
Compression:
Stored size: 581 Bytes
Contents
module PatronusFati::MessageProcessor::Alert include PatronusFati::MessageProcessor def self.process(obj) src_mac = PatronusFati::DataModels::Mac.first_or_create(mac: obj[:source]) dst_mac = PatronusFati::DataModels::Mac.first_or_create(mac: obj[:dest]) other_mac = PatronusFati::DataModels::Mac.first_or_create(mac: obj[:other]) PatronusFati::DataModels::Alert.first_or_create({created_at: obj.sec, \ message: obj[:text]}, {created_at: obj.sec, message: obj[:text], \ src_mac: src_mac, dst_mac: dst_mac, other_mac: other_mac}) nil end end
Version data entries
31 entries across 31 versions & 1 rubygems