Reasons behind the migration
We have migrated to the official mongo-c-driver binding for providing the MongoDB destination driver in syslog-ng 3.8. Previously in syslog-ng 3.7.x and earlier, libmongo-client provided this binding, mandating its own special syntax.
This change will facilitate future-proof and more fine-grained configuration. MongoDB 3 is not officially supported or being tested yet, but this kind of connection should theoretically enable easy MongoDB 3 support in the future.
What to do when using legacy syntax
If you have used legacy syntax in your configuration file, syslog-ng will substitute the given deprecated options to form a URI. Note that certain aspects of semantics could also differ between the two drivers.
Therefore, you should analyze the behavior of your deployed system to ensure that the subtle changes in semantics do not cause any regressions. A non-exhaustive list of aspects to consider:
- replica set formation
- health checks
- failure handling
- asynchronous operation
- caching & buffering
Deprecated options and substitutes
Recommended mongodb() destination option substitutes
Use the following options for the mongodb() destination:
You can refer to the documentation for more information about the format of the connection
- Connection String URI Format (mirror)
- Class ConnectionString at the Java API documentation
- MongoClient or how to connect in a new and better way
- URI format for defining connections between applications and MongoDB instances in the official MongoDB drivers
Inherited options are not affected, therefore they can be used as before and as described in the documentation. (for example,
value-pairs(), and so on)
The deprecated options of mongodb() destination
Here is the list of deprecated options and their new substitutes:
The original intention of this option was to support asynchronous operation where records can be output without waiting for acknowledgement.
See the MongoDB URI documentation for available settings that could influence such aspects of operation.
For example, you can disable write concern and set timeouts by specifying: