Mule Agent Installation

Jolokia has also a Mule ESB agent which can be deployed on the Mule ESB (running in standalone mode).

The agent jar needs to be stored within the Mule installation in lib/opt/. Additionally, the Mule configuration needs to be adapted to contain the following section:

<mule xmlns=""

   <!-- .... -->
   <custom-agent name="jolokia-agent" class="org.jolokia.mule.JolokiaMuleAgent">
      <spring:property name="port" value="8899"/>

Starting up mule should yield a startup message like

* Mule ESB and Integration Platform                                  *
* Version: 3.1.2 Build: 21975                                        *
* MuleSoft, Inc.                                                     *
* For more information go to                 *
*                                                                    *
* Server started: 8/26/11 11:26 PM                                   *
* JDK: 1.6.0_26 (mixed mode)                                         *
* OS: Mac OS X (10.6.8, x86_64)                                      *
* Host: dev4.local (                                     *
* Agents Running:                                                    *
*   Wrapper Manager: Mule PID #0, Wrapper PID #861                   *
*   Jolokia Agent: http://localhost:8899/jolokia                     *
*   JMX Agent                                                        *

Note the URL for the Jolokia agent which can be used by a client like jmx4perl, check_jmx4perl or j4psh like

 jmx4perl http://localhost:8899/jolokia list

which will result in an output similar to

            Enabled                             boolean
            void logSummary()                   
            java.lang.String printXmlSummary()  
            java.lang.String printHtmlSummary() 
            void clear()                        
            java.lang.String printCSVSummary()  
            NonHeapMemoryUsage                  CompositeData [ro] 
            ObjectPendingFinalizationCount      int [ro]
            Verbose                             boolean
            HeapMemoryUsage                     CompositeData [ro]
            void gc()

Note that Mule was started here with a server id myMule (startup option: -M-Dmule.serverId=myMule). As you can see you have access to the Mule specific MBeans and the Java platform MXBeans (which BTW is not easy achievable using Mules JSR-160 agents directly).

For enabling basic security the properties user and password can be set:

 <custom-agent name="jolokia-agent" class="org.jolokia.mule.JolokiaMuleAgent">
   <spring:property name="user" value="roland"/>
   <spring:property name="password" value="wtf"/>

On the client side the options --user and --password can be used with jmx4perl and check_jmx4perl for specifying the credentials.

Finally, all other options as specified as init parameters in jolokia.wars web.xml can be used as properties here as well.