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:
There is a specific wizard for each PowerShell Script rule type in this management pack bundle, they are:
A wizard to create custom performance collection rules of the PowerShell Script (Performance – OMS Bound) Rule Type, for collecting PowerShell script data as NRT performance data and sending it to OMS (Operations Management Suite).
Here is a detailed guide on how to create and configure a custom performance collection rule based on this rule type using it’s specific wizard, and enabling it to send it’s collected data to a Microsoft Operations Management Suite workspace.:
https://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2015/09/29/oms-collecting-nrt-performance-data-from-an-opsmgr-powershell-script-collection-rule-created-from-a-wizard.aspxA wizard to create custom performance collection rules of the standard PowerShell Script (Performance) Rule Type, for collecting PowerShell script data as performance data and writing it to both OpsMgr DB and Data Warehouse DB.
Here is a detailed guide on how to create and configure a custom performance collection rule based on this rule type using it’s specific wizard:
https://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2015/10/03/opsmgr-collecting-performance-data-using-a-powershell-script-collection-rule-created-from-a-wizard.aspxA wizard to create custom performance collection rules of the PowerShell Script (Performance - OpsDB Only) Rule Type, for collecting PowerShell script data as performance data and only writing it to the OpsMgr DB.
Here is a detailed guide on how to create and configure a custom performance collection rule based on this rule type using it’s specific wizard:
https://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2015/10/03/opsmgr-collecting-performance-data-using-a-powershell-script-collection-rule-created-from-a-wizard.aspx
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:
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:
The Script page to enter the collection script (in PowerShell) and its timeout threshold and input parameters:
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):
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!