class LogStash::Outputs::Mongodb
Public Instance Methods
receive(event)
click to toggle source
# File lib/logstash/outputs/mongodb.rb, line 16 def receive(event) @mongodb.collection(@collection).insert(event.to_hash) end
register()
click to toggle source
# File lib/logstash/outputs/mongodb.rb, line 7 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