Question

Suppose I have 8 java server applications (actually instances of the same java application) running in 4 linux boxes ( 2 each). I want to be able to monitor these applications from another linux box using Jolokia.

I also need the ability to start and stop these java applications. Can Jolokia help here?

Do I need to install one Jolokia war agent on a linux box to monitor all those 8 applications mentioned above? Or do I need to install war agent in each of the four linux boxes? Or do I need to attach jolokia JVM agent to each of the 8 java applications? Do I need to change anything in my original java applications to use Jolokia for above purpose?

Was it helpful?

Solution

I also need the ability to start and stop these java applications. Can Jolokia help here?

Jolkia doesn't allow you to start services. You could implement a custom jmx command to stop a service though, and invoke that through Jolokia.

Jolokia is pretty flexible in how you use it. You could set up 1 Jolokia proxy on any machine, and query the 8 jvms through the one proxy. You could also set up a proxy on each linux machine.

Using a proxy means you don't have to modify your application, except perhaps to add command line arguments to expose jmx remotely.

You could also package Jolokia with each jvm. How you do it depends on your application, and there are instructions here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top