SCOM 2012 R2 Java APM – Configure JEE Application Monitoring (Part 2)

In part 1 we have installed a Linux and Tomcat 6 application server. A must requirement to install and run Java Application Performance Monitoring (Java APM) is, that your application server is deeply monitored using Java Enterprise Edition (JEE) management pack for Tomcat 6. Some time ago I did write a blog post how to do that, you can find it here.

Of course before we can start we need first to install SCOM 2012 R2 Preview on Windows Server 2012 R2 Preview. A very fast and easy setup can be found here in form of a trial VHD.

The very first steps are installing the Ubuntu (Debian) Universal management pack and deploying the SCOM agent. In a next step, we are importing and configuring the JEE monitoring management pack for Tomcat 6 and finally we need to manually discover the Tomcat application server using PowerShell scripts.

Let’s start…

Prerequisites

Install first SCOM 2012 R2 and download the Linux and JEE management packs.

Import Management Pack Ubuntu 12.04.2 (Debian)

I created a folder called C:\MP on SCOM 2012 R2 where I store all my MP file. Extract the “System Center 2012 MPs for UNIX and Linux” to C:\MP…

image

In a subfolder called SCOM 2012 SP1 we will find the necessary MP files for Ubuntu. Note here that Ubuntu is based on the Debian distribution and because of that we need to import these management packs…

  • Microsoft.Linux.Universal.Library.mp
  • Microsoft.Linux.Universal.Monitoring.mp
  • Microsoft.Linux.UniversalD.1.mpb (to support Debian and Ubuntu Linux agents)
  • Microsoft.Unix.Library.mp

image

From the root directory of the MP we need in addition the Microsoft.Linux.Library.mp…

image

If select these files in the wizard you will see that everything seems to be ready to import…

image

After the MP’s have been imported create the RunAs accounts and profiles, discover and deploy the SCOM agent as described in a previous blog post here.

If everything goes well you will have successfully deployed a SCOM agent…

image

…and after a while a healthy monitored Linux server will pop up.

image

Import Java JEE Management Pack Tomcat 6

Next, we are going to install the management packs for Tomcat 6 monitoring. Download the MP to C:\MP and extracted the MSI file. It will look like this…

image

The files you need to import are the following:

  • Microsoft.JEE.Library.mpb
  • Microsoft.JEE.Templates.Library.mpb
  • Microsoft.JEE.Tomcat.6.mp
  • Microsoft.JEE.Tomcat.Library.mp

If you selected these files in the MP import wizard you will have green checkmarks everywhere…

image

Next, create a RunAs account for JEE monitoring, associate this account with the JEE Monitoring Account AND JEE Invoke Account profile as described in this previous blog post here and the MP guide. In part 1 we created a user called tomcat, this is the user you are going to use for the RunAs accounts and profiles.

Manually Discover Tomcat 6

Usually the application server and applications gets discovered automatically. In some cases it will not happen and you need to do it manually. Luckily Microsoft provides PowerShell scripts to do so. Christopher Crammond has written a great blog post how to do it exactly and what you can expect to see.

For your convenience, I have uploaded the scripts to skydrive where you can download it.

Note: There is a chicken and egg problem, because you only can get these PowerShell files if your server already has been discovered by running the Copy BeanSpy and Universal discovery files task in the next step. But this is only possible if the server is known to SCOM / has been already discovered. Well there is a solution to get these files without running this task, Christopher Crammond has written a short post about this problem.

In our case we need to run .\NewJEEAppServer.ps1 with the following parameters…

image

Almost immediately the server will appear under Universal application servers/Configured application servers . If this is the case, select the server and run the Copy BeanSpy and Universal discovery files task on the right hand side. This tasks will copy BeanSpy and the PowerShell scripts which I provided above to C:\Windows\Temp.

image

Now on your SCOM server go to C:\Windows\Temp and rename the file BeanSpy.HTTP.NoAuth.war to BeanSpy.war

image

Go go the Tomcat management page (http://ubuntu01:8080/manager.html) and deploy the BeanSpy.war by selecting the Browse… button under WAR file to deploy

If you get prompted to login, use the tomcat account we created in part 1.

image

After some time your applications gets discovered on Tomcat…

image

…and you also see some detailed properties on your application server…

image

If you take a look at the HealthExplorer of an application, you will notice that only the Availability node has a monitor (this will change when we import the Java APM management pack).

image

To check the deep monitoring functionality make sure you see performance counters and data for each of the performance views…

image

That’s it for part 2, at this moment we have a deep monitored Tomcat 6 application server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s