Setup AppDynamics for JBoss FUSE ESB / Apache ServiceMix in 5 Minutes

AppDynamics is a powerful tool for the analysis of distributed Java and .NET applications. As it has only low overhead costs (according to the vendor < 2%), it can also be used in production environments.

I use JBoss Fuse 6.0.0 on MacOS. But the setup is similar on other operation systems.

Here we go.

Download AppDynamics Lite Java version from http://www.appdynamics.com/. Name and E-Mail address must be provided (and normally you will be contacted by the vendor...).

Unzip the downloaded ZIP file AppDynamicsLite.zip to your desired installation directory <APP_DYNAMICS_HOME>:

 
unzip AppDynamicsLite.zip -d <APP_DYNAMICS_HOME>;

Go to the installation directory:

 
cd <APP_DYNAMICS_HOME>;

Unzip the viewer package:

 
unzip LiteViewer.zip

Enter the viewer directory:

 
cd LiteViewer

Start the viewer:

 
java -jar adlite-viewer.jar

Open URL http://localhost:8990/ with your browser. Default user is admin with password admin. You see an empty dashboard.

If you monitor an OSGI runtime with AppDynamics, you have to extend the boot delegation parameter of FUSE ESB. See http://litedocs.appdynamics.com/display/ADLite/OSGi+Infrastructure for further explanations. As I use Felix, I have to add com.singularity.* to the org.osgi.framework.bootdelegation property. For easier upgrade of FUSE ESB, I do not edit <FUSE_ESB_HOME>/etc/config.properties but <FUSE_ESB_HOME>/etc/custom.properties.

It is important that you don't forget to add all default values. And of course these values may change if you upgrade your FUSE ESB installation. Finally, I add following line to <FUSE_ESB_HOME>/etc/custom.properties:

 
org.osgi.framework.bootdelegation=
    com.singularity.*,
    org.apache.karaf.jaas.boot,
    sun.*,com.sun.*,
    javax.transaction,
    javax.transaction.*,
    org.apache.xalan.processor,
    org.apache.xpath.jaxp,
    org.apache.xml.dtm.ref,
    org.apache.xerces.jaxp.datatype,
    org.apache.xerces.stax,
    org.apache.xerces.parsers,
    org.apache.xerces.jaxp,org.apache.xerces.jaxp.validation,
    org.apache.xerces.dom

If your are not sure which OSGI framework you use, you can query your configuration in your Karaf console with:

 
shell:info

Configure AppDynamics agent for FUSE ESB. E.g., set $KARAF_OPTS in your shell:

 
export KARAF_OPTS="$KARAF_OPTS -javaagent:<APP_DYNAMICS_HOME>/javaagent.jar"

Or alternatively, add following statement to your start script <FUSE_ESB_HOME>/bin/karaf:

 
KARAF_OPTS="$KARAF_OPTS -javaagent:<APP_DYNAMICS_HOME>/javaagent.jar"

Start your FUSE ESB (in the same shell where you set $KARAF_OPTS):

 
cd <FUSE_ESB_HOME>/bin/fuse

Create some traffic on your FUSE ESB, e.g. invoke a web service etc.

Go back to your AppDynamics viewer browser window at http://localhost:8990/ and you should see some business transactions.

Finito.

Original post: http://peter-on-java.blogspot.com/2013/06/setup-appdynamics-for-fuse-esb-in-5.html

Tags monitoring esb