Saturday, March 24, 2012

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

In Part 1, I walked through the process of downloading and deploying the DotNetNuke application which is a free community .NET based website that we will be using for our testing of the Application Performance Monitoring functionality within System Center 2012 Operations Manager.

Once we have our .NET applications ready to be monitored, we now need to deploy the SCOM agent to the IIS servers that host them.

Use the Administration tab from the Wunderbar in the SCOM console to start the Discovery Wizard and deploy a Windows Agent to your IIS server. The screen below shows confirmation that the agent has been deployed successfully


Once the agent deployment is complete, go to the Monitoring tab in the console again and check the Application Pool State view under the Microsoft Windows Internet Information Services folder to confirm that the .NET application has been discovered. You should see a screen similar to the one below (You may need to wait a little while for discovery to complete)


Note: The IIS 7 discovery rules are all set to discover objects after 14400 seconds (4 hours) and if you haven’t got the time to wait for these discoveries to occur, you can tweak temporarily the discovery rule for the IIS 7 ASP.NET Application Endpoint to allow full discovery of your application. Without this rule being fired properly, you won’t be able to discover your app in the Web Application and Services object search later on.

When you have confirmation that your .NET application is discovered within SCOM, we will now move on to actually creating the APM template that will give us the granular information that we need to troubleshoot issues on a deep dive level

It’s good practice to create a custom group and management pack specifically for the application that you wish to monitor. To do this, go to the Authoring tab of the Wunderbar in the SCOM console, expand the Authoring view and then right mouse click on Groups. Choose the ‘Create a new Group’ option from the resultant menu, give the group a name and create a new unsealed management pack that reflects the application that you want to monitor - see the screen below for an example


Add the Windows Server objects for the servers that host the application(s) that you want to monitor as below


Move through the rest of the Create Group Wizard and click Create at the end to finish the process.

At this point, we have the .NET application configured on an IIS 7 server, we have deployed the SCOM agent to this server and ensured that the new .NET application and website have been discovered. We have also just created a custom group and unsealed management pack for which we are going to save any customisations and rules to for this application.

The next step is to create the Application Performance Monitoring component using the built in templates provided. To do this, click on the Authoring tab in the SCOM console, expand Management Pack Templates and then right mouse click on .NET Application Performance Monitoring. Now select the ‘Add Monitoring Wizard’ option. This will open up a wizard as shown below

Leave the .NET Application Performance Monitoring option selected, then click Next to continue


Enter a name and description for your monitor and then choose the new unsealed management pack that we created previously to store the monitor in. Click Next to continue once you have entered all required information


From the What to Monitor window, click on the Add button to open up the Object Search window and from here, search for and add the .NET application that you wish to monitor


Note: If you haven’t imported the two management packs outlined in Part 1 of this series, then you will not be able to find your application in the ‘Web Applications and Services’ list here. This is a common pitfall when people try to configure APM.

Once you have added your application, choose an Environment tag and targeted group from which you want to run the monitor under. I’ve chosen the ‘Test’ environment and selected the custom group I created earlier for this application. See the screenshot below for an example


Leave the Server-Side Configuration settings as they are for now and click Next


From the final screen in the Add Monitoring Wizard, you can review your configuration and then click on the Create button when you’re happy to continue.

Note: You will see from the screen below that there is a warning message stating: ‘IIS may need to be restarted’. This is always a recommendation when you configure APM for your application and if you are working in a production environment, you will need to plan for this IIS restart after hours to ensure that your monitor works.


This completes the creation of your .NET Application Performance Monitor and you should be able to see your new monitor listed under the Management Pack Templates\.NET Application Performance Monitoring view.

For Part 3 of this series, I will discuss Client-Side Monitoring and explain how to test your new APM monitor and review the alerts generated.

10 comments:

  1. HI Kevin, great stuff here.
    I have two quick ones I hope.

    1. Wondering about your comment "It’s good practice to create a custom group and management pack specifically for the application that you wish to monitor."
    I am in the situation where i will need to monitor 100's of sites and apps. Wouldn't that get clunky as far as the UI is concerned? Or would all .net apps go under one MP?

    2. On that note, why isn't it easy to automate the creation of said MP's, groups, user security for views etc? Everywhere I turn it seems powershell isn't the answer and lots of folks have the same question. To incorporate automation of monitoring into a paas or ITaas offering. It seems like MS would have devoted more to powershell.

    anyway thanks for all your posts!

    ReplyDelete
    Replies
    1. Hi Jason,

      Thanks for taking the time to post your comments. I'll try to help you out with answers!

      Firstly, if you have 100's of sites and apps to be monitored, make sure that you use the SCOM 2012 sizing calculator to ensure your database and management server configuration are deployed properly.

      Although you could put all of your applications under one MP, it's not recommended due to the fact that any customisations you make to any application will then be stored all in a single MP. If you wanted to remove monitoring of a particular application or needed for any reason to remove the single MP, then you would affect all of your applications instead of just one of them.

      In relation to PowerShell not being able to automate group creation, user security etc., I'm not a PowerShell expert by any means, but I would defintely recommend that you take a look at System Center Orchestrator to assist with automating your environment. It integrates directly into SCOM and works like a dream for most automation requirements.

      When you then start to use System Center Service Manager 2012 as the Self-Service and change-control portal for your PaaS and ITaaS offerings, you then take the design to another level completely.

      Hope this helps,

      Kevin.

      Delete
  2. Thanks for your quick response! That makes good sense regarding the MP's. I suppose I just needed it explained to me that way.
    I am also looking at Orchestrator as we speak and then like you said service mgr after that. Vertical learning curve currently.
    So your Blog has been priceless, perhaps I'll have one some day :|
    jason

    ReplyDelete
    Replies
    1. No problem at all Jason. Glad to be of assistance.

      Thanks for the great comments about the blog too, much appreciated!

      Kevin.

      Delete
  3. Kevin,

    Thanks for the great information!

    Can you recommend any further documentation on APM that can provide more granular information? I am new to the product so any information would help. I would purchase a book but I don't think they are available for SCOM 2012 yet.

    Thanks,
    Scott

    ReplyDelete
    Replies
    1. Hi Scott,

      Thanks for the comment.

      If you're looking for information on APM, then I'd recommend checking out the Microsoft APM forum on Technet as you'll get loads of great info there.

      Otherwise, you can pre-order a book on SCOM 2012 that I'm a co-author on and one that I've written the chapter on APM for. It's available in the next few weeks so you won't have to wait that long :)

      Here's the link:

      http://www.amazon.com/Mastering-System-Center-Operations-Manager/dp/1118128990

      Kevin.

      Delete
  4. Hi Kevin,

    great information. very helpfull to setup .net application monitoring. but i am having slightly issue with client side monitoring. i can not see any activty on client side monitoring and aslo AddAdvisor or AppDiaganostics is not showing any data.

    any advise please help
    regards

    ReplyDelete
  5. Hey Kevin, Jason here again.
    Do you know how long it takes for a newly created apm to appear in appdiagnostics? I've done everything correctly but it seems to take a LONG time to be able to get real data because it doesn't pop up in app advisor or diagnostics.
    moving along though, everything is working great now!
    thanks

    ReplyDelete
    Replies
    1. Hi Jason,

      It shouldn't take too long for your application to appear. Make sure that it is discovered by the IIS MP first and foremost. You can check the Discovery Rules in the Authoring tab to see exactly what the timelines are though.

      Also, don't forget that if you have configured APM CSM, you will most likley need to recycle the Application Pool (or restart IIS) on the server that you are monitoring.

      Kevin

      Delete
  6. After setting up APM to monitor an application and restarting IIS, if you then wish to monitor another application on the same IIS server would you have to restart IIS again?

    ReplyDelete