Gem page is here.
This version requires mongo gem version 1.5.2 for Replica Set.
New features
Replica Set support
You can use mongo_replset for connecting to Replica Set cluster.
Example configuration is below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Handling invalid records
Fluentd is an event collector, so Mongo plugin should handle an invalid record as a BSON.
Mongo plugin approach marshals an invalid record when mongo-ruby-driver detects such record. And Mongo plugin inserts marshaled record as a broken data to same collection.
If passed following invalid record:
1
|
|
then Mongo plugin converts this record to following format:
1
|
|
In the result, we can rescue and analyze a broken data later.
NOTE
Mongo-ruby-driver cannot detect an invalid attribute, so Mongo plugin marshals all attributes excluding Fluentd keys(“tag_key” and “time_key”).
Ignore an invalid record
If you want to ignore an invalid record, set ignore_invalid_document parameter in match.
1 2 3 4 5 6 7 8 |
|
Tag mapped mode in mongo type
0.6.0 merges mongo_tag_collection type into mongo type. You can use tag_mapped parameter in mongo type for enabling tag mapped mode.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
TODO
- Support multi-process processing using DetachMultiProcessMixin
- Support authentication if needed