Heartbeat kibana mongodb

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.

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?

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

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.

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

- 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:

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

but is not working.

Thank you again in advance

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

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