# Heartbeat kibana mongodb

**URL:** <https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [May 15, 2020, 1:31am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732 "2020-05-15T01:31:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElAouane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elaouane/32/67612_2.png) [@ElAouane](https://discuss.elastic.co/u/ElAouane)\
**Post date:** [May 15, 2020, 1:31am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/1 "2020-05-15T01:31:09Z")

</div>

Hello guys. I am working in aws on a project that is structured as follow:

- app instance (public subnet)  
-mongodb (3 instances on a private subnet, 1 is primary and the other 2 are replicaset)  
-kibana instance  
-elastic search and heartbeat instance  
-logstash instance

in my default configuration, if i log in in my kibana instance and go to uptime. i am able to see logstash,kibana and elastic search up and running. but i cant display my app instance and my mongodb instances. but if a go with my cursor on the graph, i can see the detail of services up are 15 (which is weird because i dont have that many.)

so i belive that my elasticsearch.yml, kibana.yml and logstash.yml are correctly configured because it was working before. I start getting confused on the heartbeat. I made my personal heartbeat.yml file in monitor.d and it look like this:

```
- type: tcp
  name: elasticsearch
  enabled: true
  schedule: "@every 5s"
  hosts: ["10.0.105.100:9200"]
  timeouts: 10s

- type: tcp
  name: kibana
  enabled: true
  schedule: "@every 5s"
  hosts: ["10.0.105.101:5601"]
  timeouts: 10s

- type: tcp
  name: logstash
  enabled: true
  schedule: "@every 5s"
  hosts: ["10.0.105.102:5044"]

- type: tcp
  name: instance
  enabled: true
  schedules: "@every 5s"
  ports: [80]

- type: tcp
  name: MongoDB-Primary
  enabled: true
  schedules: "@every 5s"
  hosts: ["10.0.1.100:27017"]

- type: tcp
  name: MongoDB-Secondary
  enabled: true
  schedules: "@every 5s"
  hosts: ["10.0.2.100:27017"]

- type: tcp
  name: MongoDB-Tetiary
  enabled: true
  schedules: "@every 5s"
  hosts: ["10.0.3.100:27017"]

```

following this configuration, in my kibana uptime i can visualize 3 instance: Kibana,Logstash and elasticsearch. and nothing else.

Am i missing something in my configuration?

Note: my instance, i set just the port 80 because the instance ip keep changing everytime i spin up my aws instances.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 15, 2020, 4:15am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/2 "2020-05-15T04:15:43Z")

</div>

It looks ok. Can you run a telnet to the mongo ip+port combo from the host that is running Heartbeat, to see if it can connect?

---

<div class="post-metadata">

**Author:** ![ElAouane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elaouane/32/67612_2.png) [@ElAouane](https://discuss.elastic.co/u/ElAouane)\
**Post date:** [May 15, 2020, 8:24pm UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/3 "2020-05-15T20:24:10Z")

</div>

Hello warkom. i just tested my telnet connection and it is connecting this is what it shows and thats it, ishould be able to log inside the mongo instance with telnet right?

```
telnet 10.0.1.100 27017
Trying 10.0.1.100...
Connected to 10.0.1.100.
Escape character is '^]'.

```

here is the image from my kibana. The weird thing is that diagram on top right, says there are between 6 and 3 instance up and 0 down, while the diagram on the right keep loading while saying "No monitors available"  
[kibana uptime](https://ibb.co/tLdZTLW)

---

<div class="post-metadata">

**Author:** ![ElAouane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elaouane/32/67612_2.png) [@ElAouane](https://discuss.elastic.co/u/ElAouane)\
**Post date:** [May 15, 2020, 10:46pm UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/4 "2020-05-15T22:46:56Z")

</div>

sorry for the double post. i have an update. I fixed a part of the error, now i in Kibana Discover and select metricbeat i can see the IP from one of my replicaset (10.0.2.100) but not the other 2 mongodb and in uptime i can still display only the kibana,elasticsearch and logstash instances but not the mongodb.

---

<div class="post-metadata">

**Author:** ![ElAouane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elaouane/32/67612_2.png) [@ElAouane](https://discuss.elastic.co/u/ElAouane)\
**Post date:** [May 16, 2020, 2:44am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/5 "2020-05-16T02:44:41Z")

</div>

I found my error. in my heartbeart.yml there was a typo

```auto
- type: tcp
  name: instance
  enabled: true
  schedules: "@every 5s"
  ports: [80]

```

I typed `schedules` instead of `schedule` and this does not throw any syntax error, it simply ignore all the block of code.

I would like to ask an info that i couldnt find online. My instance is running on port 80, is there anyway how i can check the if there is any service running on port 80 without specifying any public or private IP? i want to check specificly the port. Because i guess i can just give a private IP to my instance and connect that private IP as it will be static, while the Public is dynamic..i was wondering if with elasticsearch or heartbeat i can target just the port alone.

because i tried with this:

```auto
- type: tcp
  name: instance
  enabled: true
  schedule: "@every 5s"
  ports: [80]

```

but is not working.

Thank you again in advance

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 17, 2020, 4:33am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/6 "2020-05-17T04:33:39Z")

</div>

You can use a domain name/URL if you want.

---

<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:** [June 14, 2020, 4:33am UTC](https://discuss.elastic.co/t/heartbeat-kibana-mongodb/232732/7 "2020-06-14T04:33:41Z")

</div>

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