Saturday, March 24, 2012

SCOM 2012 - Configuring Application Performance Monitoring (APM) Part 1

How often have you been in a position whereby a complaint comes to you about the slow performance of a .NET application and the development team are blaming the infrastructure team and the infrastructure team are blaming the development team?

When a situation like this arises people look to you as the System Center Operations Manager (SCOM) administrator to find out what the problem is and to get answers quickly!! If the issue is related to infrastructure or the databases and Operating System that the application is running on, then SCOM will very quickly highlight the problem using the relevant SQL/Oracle, Windows/Linux and Network Monitoring management packs and functionality.

If the problem was not related to these technologies however, and was an issue with bad coding from when the application was developed for example, then you need to go much deeper with your investigations to find the root cause. In SCOM 2007 R2, if you wanted to get this type of deep dive application monitoring, then you had to integrate with a product called AviCode. AviCode was the market leader in .NET application monitoring and in the year 2010, Microsoft acquired the company with a view to integrating it into a future release of System Center.

With SCOM 2012, Microsoft have integrated the AviCode product directly into it as the new Application Performance Monitoring (APM) functionality and it works really, really well for the type of scenario described above!

This three part blog series will describe what is needed to configure the APM functionality in the SCOM 2012 Release Candidate edition.

Update March 2014: If you want to learn about the future of APM or if you want to deploy a better .NET demo application than DotNetNuke, then check out my new 'Application Insights Deep Dive' blog series here:

Application Insights Deep Dive - Getting Started

The Release Candidate of SCOM 2012 will support only .NET web applications and web services and not .NET compiled applications but this should be addressed in future updates/service packs. You need to ensure that you have installed the SCOM Web Console feature into your environment as this installation comes with the Application Advisor and Application Diagnostics features of the new APM functionality.

As a result of the web application and services monitoring functionality, only applications running on IIS7 will be monitored and we need to ensure that this management pack is deployed first and foremost.

To download the IIS 7 Management Pack and accompanying guide (you do read the guide when installing all your management packs right.....?), click on the link below:

http://www.microsoft.com/download/en/details.aspx?displaylang=en%2cen&id=9815


Once you have downloaded the IIS7 Management Pack, follow the instructions contained within the MP Guide to deploy it into SCOM 2012.

Note: It's worth pointing out here that, if you are reading only SCOM 2007 R2 references in the MP Guides and downloads, don't worry, these Management Packs all work fine in SCOM 2012.

With the IIS 7 Management Pack deployed to SCOM, you then need to manually add one more management pack from the SCOM 2012 installation media - this is the only APM management pack that is not automatically installed on deployment of your first SCOM Management Server.

This management pack file is titled ‘Microsoft.SystemCenter.Apm.Web.IIS7.mp’ and is located in the ‘Management Packs’ folder of the installation media.

The screenshots below show its location and also what it looks like when being manually imported into the console



Note: If you don’t import the above management pack into SCOM 2012, you will be presented later on with a warning message when trying to create the APM monitor. This warning is as follows:

To select ASP.NET applications or services for monitoring you need to import the following management packs:

Operations Manager APM Web IIS7 management pack

Once you have these two management packs imported, you then need to ensure you have some .NET applications that you can monitor! If you are looking to deploy this functionality for testing/demo purposes, then you can download some of the free .NET applications that are available from the general community such as ‘DotNetNuke’, ‘DinnerNow’ and ‘BlogEngine’.

The link below will allow you to download a free version of DotNetNuke:

http://www.microsoft.com/web/gallery/install.aspx?appid=dotnetnuke_iis

If you already have in place your .NET applications to be monitored, then you can skip past the DotNetNuke deployment section and move to Part 2 of this series.

Deploying DotNetNuke

I really like this application simply because the installation of it is so easy as it uses the Microsoft Web Platform Installer 3.0.

The screenshot below shows the installer window for the DotNetNuke application web infrastructure. When you click on the Install button, you will be presented with a number of options and pre-requisite checks.

If you don’t have SQL installed, then the installer will download SQL Express and deploy it to your server.

During the installation wizard, we can choose the IIS website that we want to deploy the application to or even create our own website as part of the process - nice and handy!


All going to plan, you should be finished the DotNetNuke application installation in around 5-10 minutes and then be presented with the screen below


Once the Web Platform Installer has completed, browse to the new DotNetNuke website URL, in my case I’ve installed it into the default website so my URL would be:

http://localhost/dotnetnuke/

Once the web page opens up, you will be presented with the actual DotNetNuke Installation Wizard which is a configuration installer for the application itself


The easiest way to assist you with this part of the installation is to direct you to the following link which has an online video of this part of the deployment. It’s 6 minutes long and if you follow the instructions outlined - particularly the piece on SQL user permissions, then you will be up and running in now time:

http://www.dotnetnuke.com/Resources/Training/Training-Videos/Installation.aspx

If you choose the Typical option and click through the wizard, you might come to the screen below where it is asking you to choose your SQL database type. If you try to click Next whilst leaving the default settings specified, you will get the error message below - which is kind of cryptic to us non-developer types!


The error above basically means that the credentials being used to connect to the database (in this case the SQL Express database) do not have sufficient permissions to it.

Follow the instructions in the video that I’ve linked above to allow your account permissions on the DB and you should be able to continue on.

Note: Even though I was using an SQL 2008 R2 Express instance locally on my lab IIS server, I had to select the ‘SQL Server 2005/2008 Database’ option, create an account using the SQL Management Studio that had permissions to the database, un-tick the Integrated Security option and then specify the username and password in the appropriate fields before the wizard above would continue

All going well, you should see the screen below stating that the database configuration was a success


Click Next from the screen above and you will be presented with the Configure Host Account window where you need to specify a SuperUser account that will have full admin access to your new website.

Give the new website a name, choose a template and then click Next to continue


Once the wizard is finished, you will be presented with your newly created website like the screen below - complete with a backend .NET application that we will configure for Application Performance Monitoring with SCOM 2012.


In Part 2 of this series, I will go through the process of monitoring the new application with SCOM 2012.

No comments:

Post a Comment