# How to Mongodb logs to elasticsearch through logstash

**URL:** https://discuss.elastic.co/t/how-to-mongodb-logs-to-elasticsearch-through-logstash/217181
**Category:** Logstash
**Created:** [January 30, 2020, 12:35pm UTC](https://discuss.elastic.co/t/how-to-mongodb-logs-to-elasticsearch-through-logstash/217181 "2020-01-30T12:35:16Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)
#### Post date: [January 30, 2020, 2:02pm UTC](https://discuss.elastic.co/t/how-to-mongodb-logs-to-elasticsearch-through-logstash/217181/2 "2020-01-30T14:02:04Z")

</div>

You might need to use this approach:

> [@MongoDB Logstash Integration \[Solved\]](https://discuss.elastic.co/t/mongodb-logstash-integration-solved/122299):
>
> I recently worked a lot about querying and writing values straight into MongoDB 3.6.2 from logstash. I noticed that many people in the forum tried to do the same thing and didn't succeed. I wanted to publish my solution, in case someone else need it. Hope you find this useful. If you find some way to simplify what I did, feel free to comment! grinning Reading From MongoDB: In my case, I had to periodically read new data arriving to MongoDB. In addition, I wanted to delay the processing of n…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-mongodb-logs-to-elasticsearch-through-logstash/217181)._
