# Metricbeat and mongo db replication

**URL:** <https://discuss.elastic.co/t/metricbeat-and-mongo-db-replication/173866>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [March 26, 2019, 7:00am UTC](https://discuss.elastic.co/t/metricbeat-and-mongo-db-replication/173866 "2019-03-26T07:00:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeeK](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leek/32/42766_2.png) [@LeeK](https://discuss.elastic.co/u/LeeK)\
**Post date:** [March 26, 2019, 7:00am UTC](https://discuss.elastic.co/t/metricbeat-and-mongo-db-replication/173866/1 "2019-03-26T07:00:23Z")

</div>

I have a mongodb replication on 3 servers.  
I'm configuring the metricbeat on the Central Beat Management, and I'm not sure what's the best practice- writing the three servers on the host section, or writing localhost:27017  
And should I apply the configuration tag on all three servers or just one? I'm afraid of duplicated logs

---

<div class="post-metadata">

**Author:** ![pierhugues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierhugues/32/48383_2.png) [@pierhugues](https://discuss.elastic.co/u/pierhugues)\
**Post date:** [April 1, 2019, 12:14pm UTC](https://discuss.elastic.co/t/metricbeat-and-mongo-db-replication/173866/2 "2019-04-01T12:14:41Z")

</div>

@leek If I remember correctly you have to use the `localhost:27017` options so each Metricbeat fetch the configuration for the local mongo db.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 29, 2019, 12:17pm UTC](https://discuss.elastic.co/t/metricbeat-and-mongo-db-replication/173866/3 "2019-04-29T12:17:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
