APM in the Cloud: Using AppDynamics with Openshift

Posted by Anil Mirge

May 22, 2014 5:55:00 PM PaaS, Application Performance Management, Cloud Enablement

This blog post is about two technologies that we here at Vizuri are particularly fond of: AppDynamics and OpenShift.  As a solutions engineer I frequently work with both of these technologies, and I'm excited to tell you about how to you can use them together.
With AppDynamics, it’s easy to monitor complex mission critical applications and, using AppDynamics with OpenShift, it is easier than ever to be able to deploy them to the cloud with application performance monitoring built-in.  AppDynamics has partnered with OpenShift to offer you the best in class Application Performance Management for your cloud applications.  Vizuri is a strategic partner of both OpenShift and AppDynamics.
Combining AppDynamics with OpenShift not only allows your developers to quickly develop, host, and scale applications in a cloud environment but it also gives them the ability to automatically instrument their code and map the entire application architecture with no manual configuration and code changes.
To easily demonstrate why we love AppDynamics on Openshift, we have used a Java EE 6 compliant application that uses WildFly 8 cartridge. We will show you how easy it is to deploy the application on Openshift Online and monitor it using AppDynamics.

Installation Steps

  1. First, you would need to sign up for a RedHat OpenShift account

  2. Setup RedHat client tools on your local machine

  3. Once you are done creating an account on openshift.com and setting up the RedHat client tools, you will start by adding an application using JBoss application on OpenShift

  4. Copy the Git URL from my github project and paste the url under Public URL field in the ‘Add Application’ page on OpenShift as shown in the screenshot below. By providing Git URL, your application will start with an exact copy of the code and configuration provided in this Git repository.


Figure 1: OpenShift Configure Application screen.


We could have also created the above application via the command line as follows (on a single line):

rhc app create oDynamics https://cartreflect-claytondev.rhcloud.com/reflect?github=openshift-cartridges/openshift-wildfly-cartridge --from=https://github.com/anilkmirge/OPENDynamics.git

  1. Once OpenShift finishes creating the application, take a note of the management credentials, you will need it to login into the admin console at http://localhost:9990/ using rhc port forward technique.

  2. The next step is to clone the OpenShift application that you just created. On the same page, under Source Code, copy the ssh url and open a blank terminal and navigate to a path where you would like to clone the application and run the following steps.

    $ git clone <ssh_url>

    $ cd odynamics/ ( cd into the application root directory)
    Edit the file AppServerAgent/conf/controller-info.xml and change the following values: CONTROLLER_HOST, ACCOUNT_NAME and ACCOUNT_ACCESS_KEY to be your values determined after AppDynamics sign up. You should have these values in the welcome email from AppDynamics. 

Note: There is an awesome WildFly JDK 8 version cartridge developed by our colleague Isaac Christoffersen at Vizuri. This cartridge allows us to quickly spin up an application with WildFly 8 support and enable us to add any custom environment variables (For example, we could specify the controller-info.xml properties) by simply running a 'rhc env set' command. Stay tuned for a separate blog on how to leverage this cartridge in our upcoming blog entries.

After updating the controller-info.xml file, we need to add, commit and push the changes into openshift. This will cause openshift to build the project using maven and redeploy the application.

> git add .

> git commit -m ‘Updated the controller-info.xml file’

> git push 


[INFO]: JavaAgent - Running IBM Java Agent [No]
[INFO]: AgentInstallManager - AppDynamics Agent edition [standard]
[INFO]: AgentInstallManager - Full Agent Registration Info Resolver is running
[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using application name [ODynamics]
[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using tier name [ODynamicsTier]
[INFO]: AgentInstallManager - Full Agent Registration Info Resolver using node name [NewWildFly8]
[INFO]: AgentInstallManager - Full Agent Registration Info Resolver finished running
[INFO]: AgentInstallManager - Agent runtime directory set to [/var/lib/openshift/4tgf476t74gr3823ghegr3647ru3gr/app-root/runtime/repo/AppServerAgent]
[INFO]: AgentInstallManager - Agent node directory set to [NewWildFly8]
[INFO]: JavaAgent - Java Agent Directory [/var/lib/openshift/4tgf476t74gr3823ghegr3647ru3gr/app-root/runtime/repo/AppServerAgent]
Agent Logging Directory [/var/lib/openshift/4tgf476t74gr3823ghegr3647ru3gr/app-root/runtime/repo/AppServerAgent/logs/NewWildFly8]
Running obfuscated agent
Registered app server agent with Node ID[501313] Component ID[5334] Application ID [1688]
Started AppDynamics Java Agent Successfully.

View your application and start visualizing and monitoring your application. Visit https://<appname>-<yournamespace>.rhcloud.com to view the quick start and ensure you've successfully configured connection to the AppDynamics Controller.


Figure 2: Home page of ODyanmics allowing users to register.



Figure 3: REST URL for all registered memebers



Figure 4: The bonus snoop.jsp page to analyze the JVM memory metrics

 Finally, visualize and start monitoring your application. Go to http://<CONTROLLER_HOST>[:<CONTROLLER_PORT>]/controller to see your application integrated. If CONTROLLER_PORT is 80 (as it is for SaaS controllers) it will be omitted.



Figure 5: AppDynamics Dashboard exhibiting the Application Flowmap



Figure 6: Application flow map at the individual node level


 Figure 7: Top Business Transactions of ODynamics application by Load, Response time, Errors, Slow and Stall transactions and Health Rule Violation


If you have any questions or want to learn more about Application Performance Management or perhaps wanted to see how to monitor your mission critical Java EE application on Openshift, contact us and we will set you up with a free demo and a complimentary 30 day trial of the AppDynamics Pro.

Please leave a comment and let us know what you think!

Download PaaS Anywhere OpenShift Slidedeck




Posted by Anil Mirge


Posts by Topic

see all
Request a Complimentary Docker Consultation

An Open View

Vizuri Blog

Subscribing to our blog is a great way to stay up to date with the latest information from Vizuri, as well as our strategic partners. We focus on providing a range of content that is practically useful and relevant from both a technical and business perspective.

We promise to respect your privacy.