Xplat

SCOM 2012 – JEE Application Availability Monitor Template

In SCOM 2012 you get also new possibilities to monitor your JEE application servers. If you are already monitoring an application server e.g. Tomcat then you will find under the authoring pane new Management Pack Templates.

image

If you deployed BeanSpy and you are doing some deep monitoring with your JEE application servers, the next step could be to add some salt, sorry I mean beans into our monitoring soup Smiley.

Now we want to play using MBeans. But what are MBeans? Here the a short description from Microsoft:

Java applications running in a JEE application server also have a mechanism for providing application-specific management information. This mechanism is called “MBeans”, and is a JEE standard. The application writer must choose to create custom MBeans and populate them with relevant statistics as the application runs, somewhat similar to performance counters in a Windows application.

So far so good. Let’s start an example….

I installed onto my Tomcat application server a sample application called surprisingly “Hello World” from this site here.

After installation I have another application directory…

image

In SCOM it looks like this…

image

It is an application page which says “Hello World” using different technologies.

image

We will create a 3-state monitor which should give us a green check mark if nobody looks at our page (= 0 active sessions), the monitor turns into a warning if there is 1 active session and critical if there are 2 active sessions.

Start “JEE Application Availability Monitor (3-state)” Monitoring Wizard

image

Next, I call it “Active Sessions for Hello World”

image

Now I choose my application, in this case “mytomcat-helloworld”

image

Select the application server and click “Browse”…

image

A new windows appears if you click “Run” all possible MBeans list up…phuhhh. O.k. at least we can filter using our application name mytomcat-helloworld. Click “Apply” and the list will just contain MBeans which we need.

At this point I would like to say thank you to Microsoft for making this window not bigger. Wouldn’t it be great if we could resize this window?

Anyway, click through and at some point you will find your property you need.

image

My property I found was here…it is called “activeSessions”…COOL! As you can see there are other like “maxActiveSessions” etc.

image

Click “Select” and hit “Next”

image

In this screen you do the actual mapping between your properties before and the values you wan’t to generate an alert. Click on the “Browse” button to select the property.

image

Repeat this for the “Healthy expression”, “Warning Expression” and “Critical Expression”. I set the expression value to “0” for healthy, “1” for warning and “2” for critical. This means if there are no active sessions everything is green. If there is one or two sessions it will alert me either a warning or a critical alert.

image

The last step we will configure the alert settings. Make your adjustments as needed. If you want that you will receive either a warning or critical alerts change the severity to “Match monitor’s health”.

image

And “Create” the monitor….

image

And here the template….

image

Testing

I will use my client to connect to the application…

image

There should be now one active session. Tomcat shows this on its application panel…

image

Tataaaa….the application turns into a warning

image

and the health explorer shows why Smiley. The “activeSessions” property contains the value “1”.

image

and here the alert…

image

image

If I connected with 2 sessions the monitor turned red…

image

But what happened if I connect with 3 sessions Smiley? Yes, exactly it will turn healthy…

I hope you like this post!

cu next time….

3 Replies to “SCOM 2012 – JEE Application Availability Monitor Template

  1. FYI at least in SCOM 2012 SP1, on Server 2012, that MBean monitor window is now sizable

  2. Does BeanSpy works with SCOM 2007? With BeanSpy can we monitor custom MBeans written specifically for my application to monitor some of my application specific components?

Leave a 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.