Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/ullgren/

Running Jolokia JVM Agent with Mule standalone runtime

Jolokia is a great way to monitor JVM applications and provide easy access to all the JMX goodies using simple JSON over HTTP. I would say that it has almost become the de facto standard when it comes to monitoring and managing Java applications.

While Jolokia does provide a specialized Mule agent it does not allow us to exposing the Jolokia interface over HTTPS (or enable TLS Client Authentication). On the other hand this is supported by the Jolokia JVM Agent. And it also works great with the Mule Server Runtime. In this blog post I do a step by step instruction on how to starting the Jolokia JVM Agent with the Mule runtime and enable HTTPS and basic authentication.

  1. Create /opt/jolokia/
  2. Download and copy the Jolokia JVM agent jar (in my case jolokia-jvm-1.3.7-agent.jar) into /opt/jolokia
  3. Copy your keystore into /opt/jolokia (skip this step if you do not plan to use https to access jolokia)
  4. Create a jolokia properties file in /opt/jolokia. For a complete set of configuration options see the Jolokia reference manual
  1. In your mule config add the following additional Java argument. As usual you need to change the to be a consecutive number (based on the number of additional properties).<n>=-javaagent:"/opt/jolokia/jolokia-jvm-1.3.7-agent.jar=config=/opt/jolokia/"<n>.stripquotes=TRUE
  1. Start the Mule runtime
  2. Test by using curl
user@devws:~$ curl -k https://user:password@localhost:8774/jolokia