I am looking to connect Metricbeat with multiple microservices on a node. Each microservice is running jolokia and we are looking to pull all of that data into metricbeat. We currently have metricbeat setup to monitor the system level metrics on the node itself but we were looking to connect to the microservices as well. Would this be possible?
If this is not possible, would it make sense that we create another metricbeat container on the same node to which all microservices would send their jolokia data to and then forward that data onward to the metricbeat that is monitoring the system level metrics? We are looking to have all our data in a central location.
Hi @shubhamh and welcome
Yes, Metricbeat has a Jolokia module that can be used to collect metrics from JVM applications. For that you can use the metricbeat instance you already have in your node, there is no need to start a container for each microservice. Take into account that Jolokia address has to be reachable by metricbeat.
We recently published a blogpost about monitoring java applications with jolokia and metricbeat, you can read it here: https://www.elastic.co/blog/monitoring-java-applications-with-metricbeat-and-jolokia
How are you orchestrating your microservices? if you are using kubernetes and/or docker you can use the autodiscover providers to easily manage the configuration, specially after the introduction of hints-based configuration.
Sorry for the late reply. We are currently using docker and using DCOS to manage the microservices. We are currently having trouble connecting the module to the microservices. We seem to be getting a connection refused. I have pasted our module configuration on our dcos node below. Can you please advise as to how we can connect our jolokia endpoints to metricbeat? Please let me know if you have any questions. Thank you
- module: jolokia
- mbean: 'java.lang:type=Runtime'
- attr: Uptime
- mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep'
- attr: CollectionTime
- attr: CollectionCount
- mbean: 'java.lang:type=Memory'
- attr: HeapMemoryUsage
- attr: NonHeapMemoryUsage
- type: docker
- module: docker
metricsets: ["leader", "self", "store"]
Sorry but I cannot see your configuration very well, could you paste it as preformatted text using the
If the connection refusal happens connecting to jolokia, you may need to check if there is connectivity between metricbeat and jolokia. Jolokia by default uses to listen only on localhost, if you are running metricbeat in a different container you may need to configure jolokia to listen on an interface that metricbeat can reach, or on
The autodiscover configuration you pasted looks incorrect, in the module template you need to put the module configuration you would use to collect metrics from the container matching the condition. I guess that in your case you'd like to put there the jolokia module configuration.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.