Sha256: eab890fef959daf8eca5c7b75dbe0aed0afd575670c3dbe1106f1576f6763db0
Contents?: true
Size: 577 Bytes
Versions: 9
Compression:
Stored size: 577 Bytes
Contents
require "logstash/outputs/base" require "logstash/namespace" require "em-mongo" class LogStash::Outputs::Mongodb < LogStash::Outputs::Base public def register # TODO(sissel): Port? # TODO(sissel): Authentication? # db and collection are mongodb://.../db/collection unused, @db, @collection = @url.path.split("/", 3) @mongodb = EventMachine::Mongo::Connection.new(@url.host).db(@db) end # def register public def receive(event) @mongodb.collection(@collection).insert(event.to_hash) end # def receive end # class LogStash::Outputs::Mongodb
Version data entries
9 entries across 9 versions & 1 rubygems