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 Comments

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