7.13. mongodb: Storing messages in a MongoDB database
mongodb() driver sends messages to a MongoDB database. MongoDB is a schema-free, document-oriented database. For the list of available optional parameters, see Section 7.13.2, mongodb() destination options.
mongodb() driver does not support creating indexes, as that can be a very complex operation in MongoDB. If needed, the administrator of the MongoDB database must ensure that indexes are created on the collections.
mongodb() driver does not add the
_id field to the message: the MongoDB server will do that automatically, if none is present. If you want to override this field from syslog-ng OSE, use the
key() parameter of the
The syslog-ng OSE
mongodb() driver is compatible with MongoDB server version 1.4 and newer.
By default, syslog-ng OSE handles every message field as a string. For details on how to send selected fields as other types of data (for example, handle the PID as a number), see Section 2.10.1, Specifying data types in value-pairs.