# Metricbeat mongodb no reachable servers error

**URL:** <https://discuss.elastic.co/t/metricbeat-mongodb-no-reachable-servers-error/224788>\
**Category:** Beats\
**Created:** [March 24, 2020, 8:44am UTC](https://discuss.elastic.co/t/metricbeat-mongodb-no-reachable-servers-error/224788 "2020-03-24T08:44:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Birladeanu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrian_birladeanu/32/63195_2.png) [@Adrian\_Birladeanu](https://discuss.elastic.co/u/Adrian_Birladeanu)\
**Post date:** [March 24, 2020, 8:44am UTC](https://discuss.elastic.co/t/metricbeat-mongodb-no-reachable-servers-error/224788/1 "2020-03-24T08:44:31Z")

</div>

Hello.

I have a MongoDB replica set with version 4.2.0 running in Kubernetes and I tried to add metricbeat monitoring to a secondary node (metricbeat version 7.6.1). Metricbeat successfully authenticates with a user that has clusterMonitor privileges, but then it writes the following exception in `/var/log/metricbeat/metricbeat` :

```auto
2020-03-24T08:31:11.918Z INFO module/wrapper.go:252 Error fetching data for metricset mongodb.replstatus: error getting replication info: no reachable servers

```

The mongo module file is below:

```auto
- module: mongodb
  hosts: ["localhost:27018"]
  period: 10s
  username: ''
  password: ''
  metricsets: ["dbstats", "status", "collstats", "metrics", "replstatus"]

```

I found [https://github.com/elastic/beats/issues/4689](https://github.com/elastic/beats/issues/4689) but it should have been fixed. Does anyone else have any ideas on how to fix this? Thank you.

---

<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 21, 2020, 10:44am UTC](https://discuss.elastic.co/t/metricbeat-mongodb-no-reachable-servers-error/224788/2 "2020-04-21T10:44:35Z")

</div>

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