Monday, December 20, 2010

How To: Get an alert when ‘too many’ SCOM Console connections have been made

As we all know, every time the SCOM R2 Console is launched (whether it’s the UI or the Web Console) or PowerShell with the SCOM R2 extensions is started, a connection to the RMS is made. To be more specific, a connection the SDK service (System Center Data Access) running on the RMS, is made.

But how many Consoles (UI or Web) and PS with the SCOM extensions can one run simultaneously before the RMS is starting to sweat?

Good question! In order to answer that we have to take a look first at what number Microsoft supports. This website tells one how much load a single Management Group (MG) can take, also how many simultaneous Operation consoles:
image

Wow! So my MG can take that all? Nice! But wait just a minute here. This number is not only the maximum as supported by Microsoft, it also based on the best practices on how to configure your MG. So when you run a MG based on a single-server solution (SQL and RMS run on the same server and all Agents report to that server)  - only to be advised in lab environments -  it is very likely (duh!) that the number of simultaneous running SDK connections is far less.

Also how much load the RMS takes has to be taken into account. Is it a virtual or physical server? Is it a dedicated server (I do hope so)? Does the RMS also have Agents reporting to it or is the RMS purely dedicated to the MG? And how is the environment tuned? Are all MPs imported without RTFM? Or are only the required MPs imported AND properly configured? Also, is the MG up-to-specs? Are the latest SP/CUs/MPs in place?

As you can see, it is not easy to tell how many simultaneous Operation consoles your MG can take before it begins to sweat. When you know your environment, it is basically YOU who knows best.

But think about this situation: YOU know how many simultaneous Operation consoles your RMS can take. So you have instructed your team about it. But wouldn’t it be nice to be alerted in advance before that number is exceeded? So there is time available to act?

I know. There is a Performance View which shows just that.
image

But looking at it all day isn’t a job one is waiting for, is it? So it’s time for another approach. This posting will show you how to build such a Monitor, directly from the SCOM R2 Console itself. So you get Alerts like these: 
image
(Please, don’t comment on the other Alerts, since this is just one of the many test environments I run :) )

And:
image 

No fancy MP Authoring required here. Almost Next > Next > Finish :). So let’s start!

  1. Go to Authoring > Authoring > Management Pack Objects > Monitors > right click > Create a Monitor > Unit Monitor > Windows Performance Counters > Static Threshold > Single Threshold > Simple Threshold

  2. Under the option Select Destination Management Pack, click the button New > give the new MP a good name like SDK Connections MP > Next > Create

  3. Give the monitor a good name, like Simultaneous Running Operation Consoles Monitor and a good description (like: This Monitor checks the amount of simultaneously running Operations Console connections and Alerts when the maximum number, valid for this Management Group and its setup, has been exceeded.) > select as Monitor Target Root Management Server and as Parent Monitor (where the new Unit Monitor rolls up to) Performance. Now you have a screen looking like this:
    image 
    In scenario’s like these you normally disable the Monitor and enable – after creation of the Monitor - it through an override. This is an exception however, since the target is already set at a granular level: the Root Management Server (RMS), so in this case one does not have to disable the monitor. (Yeah I know, there are other reasons as well but I want to keep this posting a bit simple…)

  4. Next > hit the button Select > now the screen Select Performance Counter is opened. As Computer, select the RMS and as Object select OpsMgr SDK Service > in the Select counter from list part of the screen select Client Connections and click OK
    image
    When back in the main screen select the option Include all instances for the selected counter and set the interval to 10 minutes.

    Now you have a screen looking like this:
    image
    Hit Next.

  5. Set the threshold value. In this example I have set it to ‘2’ which is in normal conditions far too less. Also, when the maximum number of your MG lies around 30, set the threshold at 25. So there is still time left to act when the Alert gets in:
    image
    Hit Next.

  6. Leave this screen as it is, since it’s just right :) > Next
    image 
  7. In this screen select the option Generate alerts for this monitor. As Alert Name adjust it to a more proper name like: ‘Too many simultaneous running Operation Consoles connections’. For Alert Description select this string: ‘The maximum allowed amount of Operations Console Connections (2 or less) has been exceeded! A total of $Data/Context/Value$ Console Connections has been made!’. Now you have a screen looking like this:
    image
    Set the Priority and Severity levels as required > hit Create.

  8. The MP will created now and will be running soon. When the maximum amount of simultaneous running Operation Consoles connections has been exceeded, the SCOM Console will show this error:
    image

So now SCOM will Alert you in time! Nice isn’t it?

Reminder:
Normally there are always a few SDK connections active, like the SDK Service running on the RMS itself. So when a number of five is shown, it does not mean there are FIVE Operations Consoles running…

1 comment:

Daniel said...

We currently have an issue in our environment and can see that we have 30+ connections.