logstash
logstash

mongodb

Status: beta

Synopsis

This is what it might look like in your config file:
output {
  mongodb {
    collection => ... # string (required)
    database => ... # string (required)
    host => ... # string (required)
    password => ... # password (optional)
    port => ... # number (optional), default: 27017
    tags => ... # array (optional), default: []
    type => ... # string (optional), default: ""
    user => ... # string (optional)
  }
}

Details

collection (required setting)

  • Value type is string
  • There is no default value for this setting.

The collection to use. This value can use %{foo} values to dynamically select a collection based on data in the event.

database (required setting)

  • Value type is string
  • There is no default value for this setting.

The database to use

host (required setting)

  • Value type is string
  • There is no default value for this setting.

your mongodb host

password

  • Value type is password
  • There is no default value for this setting.

port

  • Value type is number
  • Default value is 27017

the mongodb port

tags

  • Value type is array
  • Default value is []

Only handle events with all of these tags. Note that if you specify a type, the event must also match that type. Optional.

type

  • Value type is string
  • Default value is ""

The type to act on. If a type is given, then this output will only act on messages with the same type. See any input plugin's "type" attribute for more. Optional.

user

  • Value type is string
  • There is no default value for this setting.

This is documentation from lib/logstash/outputs/mongodb.rb