That is what the mongodb input does. That is not an elastic supported input.
If I had to deal with that I would install the bson gem (see here for how to do that and why it is a bad idea), then repurpose some IBM code to do the BSON => JSON conversion in a ruby filter.
If you can get that working it would be interesting to see.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.