Glad you are here. It’s time to take a deeper look at all the various monitoring metrics that AppDynamics provides. We have so far done the following:
- Installed AppDynamics Controller
- Installed a sample application (Node.js,REST and mysql) and installed appdynamics agent
- Ensured the application shows up in the controller UI.
Note that we have not customized any monitoring elements yet. i.e whatever we are going to see is out-of-the box, which is one of the coolest things about AppDynamics. Let’s start.
How to view the Flow Map of the Application ?
Application flow map provides an excellent view of the data flow of the application. AppDynamics automatically tracks all the inbound and outbound calls of the instrumented application and attempts to draw this flow map. It is like an interactive Visio Diagram of the application infrastructure architecture that you did not create. (AppDynamics created it for you). Let’s take a look at the Flow Map of the sample application we have instrumented.
So you have installed AppDynamics Controller, instrumented a simple Java Application and even viewed it from AppDynamics Controller UI. You have come a long way. Excellent work! In this blog post, I’ll take you a step further by showing you how to view critical Application Metrics in the UI. In order to get to see various monitoring metrics, let us use a more sophisticated application (one with a backend database).
Fortunately a sample application is available at github specifically for this purpose. Kudos to the developers who made this available to all of us. The application is based on Docker (no surprise there) so you need to have Docker installed in your server that you are planning to use as the Application host. If you don’t want to go this route, simply instrument one of your applications (preferably in Dev environment).
Here are the steps to install the docker based sample application.
- Clone the git repo
git clone https://github.com/Appdynamics/SampleApp.git
Now that you have your AppDynamics Controller up and humming, the next step is to instrument an Application to see the awesomeness of AppDynamics in practice.
For this blog post, I’ve chosen a very simple Java Web Application running on a tomcat server (It is the ‘sample’ application that comes with tomcat). The instrumentation process is fairly straight forward. While what I’m about to show is fairly manual, in real world scenarios involving hundreds of servers, you will be using some sort of automation 🙂
At high level, here is the procedure:
- Download the agent software either from the controller UI, or from appdynamics website
- Copy the agent software to the target application server (which is to be instrumented)
- Update the java command line that starts the application to instrument AppDynamics and restart the Application Server.
Ready ? Let’s get started.
Are your ready to taste the awesome power of Docker? I hope you are. Because once you get your feet wet in Docker, you will be unstoppable :-). In this blog post, I want to quickly show you how you can install Docker on RedHat Enterprise Linux. The procedure should be similar in other flavors.
- First, login as root into your system. If you don’t have root access, you should at least have sudo access to root.
- Create a docker repository file as follows
- Use your favorite text editor to create a file named /etc/yum.repos.d/docker.repo
- Add the following contents
OK. So, you want to get AppDynamics controller installed on your Mac. Perhaps you want to test the awesome power of AppDynamics locally before purchasing the product. Great. In this blog post, I’m going to show you how to get AppDynamics Controller installed on your Mac. Let’s get to work.
- Login to https://aperture.appdynamics.com/download/
- Scroll down on the left pane and select the Mac check box
When working with shells, if your Mac does not show various colors automatically, you can enable them by two easy steps.
First add a line as shown below to your .bash_profile. This file should be under your home directory.
Second, add the following line in your .vimrc file. This file should be under your home directory. If it is not there, create one.
While Unix/Linux is the most popular OS for hosting enterprise java applications, there are still significant amount of applications deployed on Windows Platform. If your application is running on a Windows box, you ought to know how to get around Windows in order to support your application effectively.
In this piece, I’m going to share with you 10 tricks every Java Developer should know. I tested these in Windows 2008 R2. But it should work on most Windows flavors. Let’s get right to it.
1. Find the full command line of your java application
In Unix/Linux, if you need to see the full command line of your application, you can simply use ‘ps –ef’. For example,
ps –ef | grep <my application>
Alas! There is no ‘ps’ in windows. So, how do you do this? Say hello to Windows Task Manager.
Oracle Hotspot, IBM SDK, HP NonStop Server for Java, Jrockit…. Why so many flavors of JVM? And more importantly, why do you care ?
While it is Sun/Oracle that originally created the Java Virtual Machine, since JVM is basically a set of specifications, any vendor could create their own version of JVM. Several vendors jumped in to create their spin offs. Some are free and open source but some are proprietary. The following JVMs are prominent in the market today
In addition to the above, Apple has their own spin off that is used in MAC.
Sun/Oracle HotSpot is still the market leader (about 60%). Oh, by the way, you will be surprised to know that there are more than 30 JVMs out there. Did you know apache had its own JVM (Apache harmony) ?
Why do you care which JVM is being used?
As an Application Support Engineer, you have to care about the flavor of the JVM for four major reasons
In a JEE Application Server such Oracle WebLogic or IBM WebSphere, where exactly does JVM fit in?
In short, each instance of a JEE Application server runs as a JVM that executes one or more JEE Applications deployed. In other words, Application Server is yet another java application (a big one) that executes custom developed JEE Applications.
Earlier we saw how a JVM can be started by using the ‘java’ command and passing the class name as the parameter
In a JEE Application Server’s case, it will be something like this:
java –classpath /opt/jboss-as/bin/run.jar com.jboss.Main
The above example starts a Jboss Application Server. Note that there will be several additional Java command line parameters in real world.
Let us understand what a JEE Application Server really is.
A Java application is launched with the java command which starts a JVM and runs the application. As an Application support engineer, there are few basic operations that you will typically perform on the JVM. Here are they:
Starting the JVM simply means starting the Java application. A Java application is started using the java command.
java is the command
HelloWorld is the classfile without the .class extension
Note: Don’t use the .class extension in the java command. If you do, you will get an error
[ec2-user@java]$ java HelloWorld.class
Error: Could not find or load main class HelloWorld.class
There are numerous command line options for the java command. Here are some of the main ones you need to know.