Showing posts with label System Center 2007. Show all posts
Showing posts with label System Center 2007. Show all posts

Friday, January 25, 2013

SCOM 2012 - Maximum Number of Asynchronous Responses (5) has Been Reached

Came across an interesting issue yesterday. We have been working on a PowerShell script that would automatically change the resolution state of incoming alerts to a predefined state so we could send out notifications based on that state (i.e. if server is in group "A" and an alert comes in for that server, change the Resolution state to High Priority and send an email to A, B and C distribution lists). I plan to do a follow up segment providing more details on this at a later time.

We have the script in place and it is working as expected. Alert comes in > PowerShell script changes the resolution state > Notification goes out. Now during our testing we only were working on one alert at a time. Flipping the state back and forth between New and High and everything worked just fine. We expanded testing to the live environment and let it cook for a while. After about a week we noticed that not all of the Resolution states were changing from New to High automatically. After further investigation we noticed that the alerts that were not changing had all come in within about a second or so of each other. So for instance a server kicks off fifteen alerts within one second of each other only some of them would change to the new state, or there was a network issue and we lost connection to twenty servers we were only notified on a few.

After some investigation we found the following error in Management Group Health, "The process could not be created because the maximum number of asynchronous responses (5) has been reached, and it will be dropped":

As it turns out SCOM cannot execute more than 5 command notifications asynchronously by default. It is setup this way to protect the RMS box from being overwhelmed in the event of a flood of alerts. Well this can be a bit counter productive if you are relying on the command function to execute as part of notifications. If there were a real disaster you may not actually realize it if you only see one out of potentially hundreds of notifications.

Fortunately this setting can be modified. There is a registry key you can put in place to override this setting. I urge caution, however. By changing this setting you can overload your management server if the script does fire a lot or if it takes extensive time to process especially if it is on an slower machine. I would increase it slowly over a bit of time to make sure you don't get undesired results.

On the RMS box open up RegEdit. Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft Operations Manager\3.0\Modules.
  1. Create a new subkey called Global (if it does not already exist)
  2. In Global create another new subkey called Command Executer
  3. In Command Executer create a new DWORD called AsyncProcessLimit
  4. You can set the decimal value between 1 and 100. Again I would start small, say 20 and move up from there.
  5. Restart the Health Service to allow the new settings to take effect.
5/18/16 - Update
So to make this a bit easier I wrote a PowerShell script to create this key for you. This will create the key and set it to 20.
$regKey = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey(([Microsoft.Win32.RegistryHive]"LocalMachine"),'.');
[string]$KeyName="SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Command Executer";
[void]$regKey.CreateSubKey($keyName); 
$subKey = $regKey.OpenSubKey($keyName,$true);
$subKey.SetValue("AsyncProcessLimit", 20,[Microsoft.Win32.RegistryValueKind]::DWord); 
Stop-Service HealthService
Start-Service HealthService

More to come!


If you like this blog give it a g+1


Contributing Documentation: Clive Eastwood

Friday, November 30, 2012

SCOM 2012 - Exporting Agent List

There will be times when you do a deployment where you need to validate the deployed agents against a "master list" of servers that a client has, in order to make sure that you are getting agents out to all machines. As you know using the console to do this is tedious at best. There is, however, a PowerShell command to export out the complete list of agents to a .csv file.

To pull the agent list, open Operations Manager Shell.
Start > All Programs > Microsoft System Center 2012 > Operations Manager Shell

For SCOM 2007 R2:
get-agent|export-csv -notype c:\AgentList.csv
For SCOM 2012:
get-scomagent|export-csv -notype c:\AgentList.csv
This will drop a .csv file on your C:\ called AgentList and you will be able to import this into Excel and compare with your master list.


More to come!

If you like this blog give it a g+1

Tuesday, November 27, 2012

SCOM - MP Viewer

I wanted to take a moment to talk about one of the tools that I think should be in every SCOM Admins toolbox, MP Viewer. This was a tool that was originally developed for 2007 by a man named Boris Yanushpolsky who was a programmer for Microsoft. Boris left the team and it was later adapted to the 2012 platform by Daniele Muscetta a program manager, also with Microsoft.

This is the quickest and easiest way to iterate exactly what is "built in" to any given management pack. You can download the tool from Microsoft. It needs to be run on one of your management servers. It cannot be run remotely. Once you have it on your management server go ahead and run it. It will prompt you to open a .mp file. For those of you who are not aware when you extract .msi files for management packs, by default, it put them in the C:\Program Files (x86)\System Center Management Packs directory. You will need to manually download the .mp files from the System Center Marketplace.

For this example we will be exploring the Microsoft.Windows.Server.AD.2003.Monitoring.mp file. Once you have loaded the .mp file you should see something similar to below. The first think to keep in mind when using this tool is not everything in the navigation tree will have information for every management pack. These will vary depending on what type of .mp you are looking at. I will cover some of the highlights in this segment.

As you go through the navigation tree you will a few of the things I always check are Monitors and Rules. These will provide you with the baseline of all the metrics included with this .mp file. It will give you the name of the monitor, what the target is, the category type (i.e. availability, performance, etc.), and most importantly it will tell you if the metric is enabled by default. Meaning you will start polling data as soon as you install the management pack.

With Rules, similar to monitors you can see what the metric is, its type, the collection category and whether it is enabled by default. 

Views are the out-of-the-box dashboard elements that have been created for this particular .mp. You will see these in the Monitoring space under the respective management pack.

A few final things to talk about with this tool are the functions that are available with it. You can use MP Viewer to unseal .mp file, although I urge caution when doing this as you can cause problems with SCOM if you don't know what you are doing when editing the raw .xml file. You can also save the output of MP Viewer to an Excel or HTML file. I use this feature regularly when creating metric spreadsheets for clients. This gives them a place to review all of the existing metrics and determine if they are needed or not.

Take some time and get familiar with the tool, as it will be very helpful as you work with SCOM


More to come!


Friday, November 23, 2012

SCOM 2012 - AV Exclusions

When you are setting up SCOM (either 2007 or 2012) it is important to make sure that if you have any anti-virus programs running on your servers that you setup exclusions for SCOM. If you don't you can dramatically impact performance of both the Operations Console and SCOM itself, as well as preventing SCOM from working properly.

Exclusions by Executable:
The first thing you want to exclude is the .exe file. Be careful when doing this as excluding executable can cause unwanted side-effects such as preventing other undesirable programs from being identified. The executable is the same for both 2007 and 2012:
  • monitoringhost.exe
Exclusions by Directory:
When setting up exclusions for directories be sure to include real-time scans, scheduled scans and local scans. I will be putting in the default directories in this segment. You may have to adjust the locations in the exemptions if you did not use the defaults. Also, if the directory has greater than 8 characters you will need to put both the long and short directory names into the exclusions list (required by some AV programs to traverse the subdirectories).

SQL Database Servers
These exclusions include the SQL Server database files that are used by Operations Manager components and the system database files for the master database and for the tempdb database. To exclude these files by directory, exclude the directory for the .ldf and .mdf files such as:
  • C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data
  • D:\MSSQL\DATA
  • E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Log
You will also want to exclude file types by extension. These exclusions include the SQL Server database files that are used by Operations Manager components and the system database files for the master database and for the tempdb database. The following file name extension-specific exclusions for Operations Manager includes real-time scans, scheduled scans, and local scans.
  •     MDF
  •     LDF
Operations Manager (Management Servers, Gateways and Agents)
These exclusions include the queue and log files that are used by Operations Manager.

     For 2007
  • C:\Program Files\System Center Operations Manager 2007\Health Service State\Health Service Store
     For 2012
  • C:\Program Files\System Center Operations Manager 2012\Health Service State\Health Service Store
  • C:\Program Files\System Center 2012\Operations Manager\<Component>\Health Service State\Health Service Store (<Component> will vary depending on if the server is an Agent or Server for Operations Manager)
The following file name extension-specific exclusions for Operations Manager includes real-time scans, scheduled scans, and local scans. Operations Manager (Management Servers, Gateways and Agents). These exclusions include the queue and log files that are used by Operations Manager.
  •     EDB
  •     CHK
  •     LOG
Note Page files should also be excluded from any real-time scans.

For additional information on AV exclusions refer to KB975931


More to come!