Xplat

SCOM 2012 Linux Monitoring (Lab) – Part 4 Monitoring Application Server

In Part 3 we deployed the agent to  LINUX and started to monitor SUSE LINUX. But just want to give you some impression how and what it is going to look like.

The diagram shows you disk, network card and the operating system in a nice view.

View2Linux

There is a lot of data you get back from LINUX. If you look at the pre-defined views all this is available and it works Smiley.

image

I just picked the “Network Adapter Performance” view to show how it looks like…

image

But now back on track…first I wanted to show how to configure a monitor, now I decided to go a step further and install an application server on LINUX and start monitoring this guy. SCOM 2012 supports these application servers on Windows and LINUX:

image

I picked Tomcat 7, because it should be easy to install and it is free. There are 2 things we need to install.

Then we have to import the management packs and configure the RunAs accounts. Let’s start…
Install Java SE Development Kit

Java Development is a pre-requisite for Tomcat so we need to install them first. Pick the right edition, if you followed my posts so far then you need the Linux x86 (32-bit)  jdk-7u3-linux-i586.tar.gz .

image

If you downloaded the package go to your command shell in LINUX

mkdir /usr/java

copy the file to this /usr/java directory

image

Change the directory and extract the jdk-7u3-linux-i586.tar.gz file…

image

Next we need to set user path variable to point to the java directory.  To do this we will create a file which changes the path permanently for the user root. This works only for the bash shell. To find out which shell you are using type:

image

You should see a bash process.

Login as user root

  • Type  cd ~(changes to the home directory)
  • Type vi .bashrc (it opens vi editor and the file .bashrc)

image

Into the file type the following lines…

image

…then save and quit. Everytime you login as root the PATH variable and JAVA_HOME will contain the java path

image

Install Tomcat

Download the source file from the Tomcat page (apache-tomcat-7.0.0.26.tar.gz file). Next copy and paste the file into your /usr/share directory…

image

Then extract the compressed file…

image

At this point Tomcat is installed but not running. To start Tomcat we change to he directory /usr/share/apache-tomcat-7.0.0.26/bin directory and start or stop Tomcat.

image

You can easily checking if Tomcat is running by opening a web browser and typing http://localhost:8080

image

As a last step we need a user account which as access to Tomcat.

Open the tomcat-users.xml file in the /usr/share/apache-tomcat-7.0.26/conf directory…

image

Uncomment the user/role section and in my case i used the manager-gui role and mapped it to the “tomcat” user

image

So that’s it, you can login using the “tomcat” user account…

image

Import management packs

From here download the SC2012_JEE_RC_1021.2.zip file and extract it. Next import the following management packs…

m

…and start the import

10

These management pack create RunAs profiles, so we need to create the account. In the SCOM console go to Administration/RunAs Configuration/Accounts and create a Basic authentication account. In my case I already created this account I show you just its properties Smiley

image

General Properies…

image

Credential, here I used my account which I created before…

image

Distribution…

image

Now map this account to the JEE monitoring account profile…

image

Target all objects…

image

Monitoring

After some time you should see the Tomcat applications popping up. To accelerate the discovery restart the health service. Et voilà….

a

If you select the SUSE Computers Diagram view and we will see something like this ….

image

What we got now is a basic application monitoring. O.k. According to Microsoft it means:

Basic Monitoring
The JEE Application Server monitoring packs allow the IT administrator to automatically discover instances of an application server that are running on a managed computer, and then to monitor the basic health of those instances. The IT administrator can determine if the application server is running and if resource utilization is within desired thresholds. This basic monitoring provides great benefits when scaled to hundreds or thousands of servers in a large data center.

But now there is also so called deep monitoring and Microsoft says:

Deep Monitoring
The JEE Application Server monitoring packs utilize extended capabilities when BeanSpy, an open source Java component from Microsoft, is installed on the managed computer.  BeanSpy allows the monitoring packs to get more detailed information from the application server instances that include the following:

  • Applications deployed in the application server.
  • Number of garbage collections per second.
  • Time spent in garbage collection.
  • Current memory usage and capacity.
  • Number of class loaded in the JVM.
  • Number of active threads.

Here the performance views, now there is nothing to see…

image

It basically means if we want to get more performance infos about our application, we will need to do some more steps.

There is a piece of code called BeanSpy which you have to upload onto your application server to make this monitoring possible.  You will find the files on your management server in the following directories if you go and search for *bean*

image

or in the same package where you got your JEE management packs from here

image

Rename the BeanSpy.HTTP.NoAuth.war to BeanSpy.war and copy it to your LINUX system using WinSCP (see Part 3 where to get WinSCP and how to use).

Next go to your Tomcat homepage click on Manager App and login as “tomcat” , then scroll down until you see WAR file to deploy. Browse to your directory and upload this file.

image

Now you should see it like this….

image

To verify its functionality enter ther URLs (case sensitiv Zwinkerndes Smiley), you should see some XML returning…

image

Go back to your SCOM console and run task “Enable deep monitoring using HTTP”…

image

You might have to restart your health service and/or your Tomcat application. After a while you will find these performance counters enabled here e.g heap memory.….

image

That’s it for part 4…. Smiley

4 Replies to “SCOM 2012 Linux Monitoring (Lab) – Part 4 Monitoring Application Server

  1. Hello scomfaq, nice post about SCOM with web apps monitoring…
    I trying to monitor a tomcat application, but I dont see the apps on scom console… I follow your steps…
    though on “RunAs” step , my tomcat admin is not “tomcat”. His name es “tomadmin”, may be, it is the problem?
    Also, I restarted de Managment Server, It has been two days and I dont see web apps 🙁
    If you have anwser, I appreciate you!

    Thanks a lot.

    Ed

    1. Hi Ed

      Do you see any error/warning events in OperationsManager event log?

      The RunAs account corresponds with my tomcat user in the tomcat-users.xml. If you used another user in the tomcat-users.xml then just use that account for the RunAs account.

      Cheers,

      Stefan

  2. Hi Stefan,

    While distributing run as account should we give SCOM management server or the Tomcat application server?
    In my environment tomcat application is hosted on linux server but linux server can’t be find to distribute. Please suggest.

Leave a Reply to scomfaq Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.