다음을 통해 공유


OpsMgr: New Sample PowerShell Collection Rule Wizards in the Ops Console

This post features a new sample management pack bundle that provides a set of wizards to allow the user to create different types of PowerShell based script collection rules with specific templates in the Operations Console in System Center Operations Manager 2012. 

The sample management pack bundle can now be downloaded from the TechNet Gallery.

Importing this management pack bundle will allow three PowerShell Script Performance Collection Rule Types to appear under the Collection Rules\Probed Based folder on the “Select a Rule Type” wizard page as follows:

image

There is a specific wizard for each PowerShell Script rule type in this management pack bundle, they are:

 

The sequence of pages used for each wizard of these PowerShell Script rule types are the same (but each is mapped to a different DataSourceModule element), with a total of 4 pages to capture user configuration inputs for creation of a new custom collection rule based on the rule type selected.

The General page to specify the display name, target, category of the new custom collection rule and whether it should be enabled straight away:

image

Note: The “Rule is enabled” option does not work for the wizard of the PowerShell Script (Performance – OMS Bound)Rule Typeregardless of whether its checked or unchecked. This is a safety measure to ensure that custom rules created based on this rule type are disabled upon creation to avoid unnecessary submission of excessive collected data to OMS.

The Schedule page to configure the collection interval:

image

The Script page to enter the collection script (in PowerShell) and its timeout threshold and input parameters:

image

Refer to the following posts on how to specify Script Parameters via the Parameters option on the Script page:
New Sample Wizard to Create PowerShell Monitors in the Ops Console
Using a Scriptblock in a PowerShell Monitor Created in the Ops Console

The Performance Mapper page to enter the performance mapping information for the script data collected (retrieved from a propertybag):

image

Lastly, clicking the Create button on the Performance Mapper page will create a new instance of a custom performance collection rule, based on the PowerShell script collection rule type selected from the Rule Type page, and the configuration will be saved in a custom management pack selected in the General page.

Acknowledgement:
Thanks to Silvana Deac’s blog post on the possible causes of System.Collections.Generic.KeyNotFoundException errors, some hurdles and issues encountered during the base management pack creation process in the able to be resolved !
https://blogs.technet.com/b/silvana/archive/2014/10/13/system-collections-generic-keynotfoundexception-the-given-key-was-not-present-in-the-dictionary.aspx 

  

 

Disclaimer:
All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use at your own risk. The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of my employer.

Comments

  • Anonymous
    September 28, 2015
    cool guide!