# MongoDB logs are not reflecting in kibana dashboard

**URL:** <https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493>\
**Category:** Kibana\
**Created:** [September 14, 2020, 8:50am UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493 "2020-09-14T08:50:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay\_venky](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_venky/32/75508_2.png) [@vijay\_venky](https://discuss.elastic.co/u/vijay_venky)\
**Post date:** [September 14, 2020, 8:50am UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/1 "2020-09-14T08:50:05Z")

</div>

MongoDB logs are not reflecting in kibana dashboard  
MetricBeat YAML file is configured correctly and mongo DB YAML module enabled

mongodb.yml:

# Module: mongodb

# Docs: [https://www.elastic.co/guide/en/beats/metricbeat/6.8/metricbeat-module-mongodb.html](https://www.elastic.co/guide/en/beats/metricbeat/6.8/metricbeat-module-mongodb.html)

- module: mongodb  
metricsets:

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 14, 2020, 11:51am UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/2 "2020-09-14T11:51:47Z")

</div>

Is there data in the metricbeat indices?  
If not, you should check the metricbeat logs for any errors. It's usually pretty verbose.

---

<div class="post-metadata">

**Author:** ![pratap1991](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@pratap1991](https://discuss.elastic.co/u/pratap1991)\
**Post date:** [September 14, 2020, 12:01pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/3 "2020-09-14T12:01:09Z")

</div>

logs are loading in dashboard but in dashboard i am trying view graphs getting below error  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b2ac4054ba4849a0a8236441f12ce29600c7980.png)

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 14, 2020, 12:03pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/4 "2020-09-14T12:03:30Z")

</div>

Are they mongo logs or system logs? Because by default the system metricset is also enabled in Metricbeat. Just check a couple of documents for the module field.

---

<div class="post-metadata">

**Author:** ![pratap1991](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@pratap1991](https://discuss.elastic.co/u/pratap1991)\
**Post date:** [September 14, 2020, 12:21pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/5 "2020-09-14T12:21:37Z")

</div>

Thanks for quick reply i disabled system module already

---

<div class="post-metadata">

**Author:** ![pratap1991](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@pratap1991](https://discuss.elastic.co/u/pratap1991)\
**Post date:** [September 14, 2020, 12:30pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/6 "2020-09-14T12:30:21Z")

</div>

i checked metricbeat logs below error throwing

2020-09-14T12:27:57.652Z ERROR mongodb/mongodb.go:98 Error establishing direct connection to mongo node at [ip-\*.ec2.internal:27017]. Error output: no reachable servers

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 14, 2020, 12:30pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/7 "2020-09-14T12:30:36Z")

</div>

Oh then, let's try and open one of the visualization in from the dashboard and investigate more. You can use the inspect menu to see the requests and response from Elasticsearch. Check to see if there's anything there that doesn't match your data: maybe a different index pattern name or something.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 14, 2020, 12:31pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/8 "2020-09-14T12:31:18Z")

</div>

Ah, ok, looks like a connectivity error then. I would check SSL settings and or port forwarding first.

---

<div class="post-metadata">

**Author:** ![pratap1991](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@pratap1991](https://discuss.elastic.co/u/pratap1991)\
**Post date:** [September 14, 2020, 12:32pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/9 "2020-09-14T12:32:59Z")

</div>

mongodb.yml:

```auto
# Module: mongodb

# Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.8/metricbeat-module-mongodb.html

* module: mongodb
metricsets:
  * dbstats
  * status
  * collstats
  * metrics
  * replstatus
period: 10s

# The hosts must be passed as MongoDB URLs in the format:

# [mongodb://][user:pass@]host[:port].

# The username and password can also be set using the respective configuration

# options. The credentials in the URL take precedence over the username and

# password configuration options.

hosts: ["*.ec2.internal:27017"]

# Optional SSL. By default is off.

ssl.enabled: true

# Mode of verification of server certificate ('none' or 'full')

ssl.verification_mode: 'full'

# List of root certificates for TLS server verifications

ssl.certificate_authorities: ["/etc/pki/tls/certificates/CA.crt"]

# Certificate for SSL client authentication

ssl.certificate: "/etc/pki/tls/certificates/server.pem"

# Client Certificate Key

ssl.key: "/etc/pki/tls/certificates/server.key"

# Username to use when connecting to MongoDB. Empty by default.

username: ****

# Password to use when connecting to MongoDB. Empty by default.

password: ******
~
~

```

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [September 14, 2020, 12:45pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/10 "2020-09-14T12:45:34Z")

</div>

> [@pratap1991](#):
>
> ```auto
> # The hosts must be passed as MongoDB URLs in the format:
> 
> # [mongodb://][user:pass@]host[:port].
> 
> ```

You followed this in the edited out part of the hosts, right?

---

<div class="post-metadata">

**Author:** ![pratap1991](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@pratap1991](https://discuss.elastic.co/u/pratap1991)\
**Post date:** [September 14, 2020, 2:36pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/12 "2020-09-14T14:36:39Z")

</div>

issue resolved thank you so much you quick response @Marius_Dragomir

---

<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:** [October 12, 2020, 2:36pm UTC](https://discuss.elastic.co/t/mongodb-logs-are-not-reflecting-in-kibana-dashboard/248493/13 "2020-10-12T14:36:54Z")

</div>

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