Sha256: b3439433e80f069b193db78bfe44fac3adbd3adb4e059f439a1d746aaf83941d
Contents?: true
Size: 488 Bytes
Versions: 16
Compression:
Stored size: 488 Bytes
Contents
require "logstash/outputs/base" require "em-mongo" class LogStash::Outputs::Mongodb < LogStash::Outputs::Base def initialize(url, config={}, &block) super end def register # Port? # Authentication? db = @url.path[1..-1] # Skip leading '/' @mongodb = EventMachine::Mongo::Connection.new(@url.host).db(db) end # def register def receive(event) @mongodb.collection("events").insert(event.to_hash) end # def event end # class LogStash::Outputs::Mongodb
Version data entries
16 entries across 16 versions & 1 rubygems