OpsMgr: Enabling a Linked Report for a Collection Rule Created with Silect MPAuthor SP4
Silect recently released MP Author SP4. This tool is targeted at the IT Pros and allows them to easily build completely new or even customize existing management packs for OpsMgr.
In this post, I will demonstrate how a Performance Top Object Linked Report can be configured for the collection rule created with Silect MPAuthor SP4 and featured in my last post.
For more in depth information on how to create a PowerShell script collection rule using the older version of MP Author, please visit my previous blog post. The steps to create a PowerShell script collection rule are mostly identical between the previous versions.
To enable a Linked Report for a PowerShell Script collection rule in MP Author, the Save to Data Warehouse and Report Name check boxes must be checked on the Rule Options page during creation of the collection rule:
The Linked Report will be created together with the PowerShell Script collection rule after the creation process is complete.
This Linked Report will show up in the Reporting workspace after the MP Author SP4 created management pack is imported into an OpsMgr management group.
However, if this Linked Report is run, it will display an error message “The ‘TimeType’ parameter is missing a value” as follows:
Therefore, here are 4 additional steps to take in order to fix the Linked Report created with the collection rule in MP Author SP4, by converting the Linked Report to a Performance Top Object Linked Report:
Click the Edit XML button of the Linked Report and remove the <Dependencies> section under the <LinkedReport …> section:
<Dependencies>
<Rule>Sample.MP.with.PS.Rule.MPAuthor.SP4.GetHealthServiceWorkflowCount</Rule>
</Dependencies>Add a <Parameters> section before the end of the </LinkedReport> tag with Parameters RuleId, SortOrder, TopCount and RuleInstance as follows:
<Parameters>
<Parameter Name="RuleId">
<Value>$MPElement[Name="<<Your Rule Name>>"]$</Value>
</Parameter>
<Parameter Name="SortOrder">
<Value>-1</Value>
</Parameter>
<Parameter Name="TopCount">
<Value>10</Value>
</Parameter>
<Parameter Name="RuleInstance">
<Value></Value>
</Parameter>
</Parameters>Thanks to Eugene’s article on Performance "Top" linked reports from a few years ago, I was able to figure out how to configure the SortOrder and TopCount parameters:
Replace the Base report type with Top N Performance report type:
Base="ReportingLibrary!Microsoft.SystemCenter.DataWarehouse.Report.PerformanceTop">
Before:
After:
Remove the Target setting from the LinkedReport section:
Target=”SC!Microsoft.SystemCenter.CollectionManagementServer”Before:
After:
Re-import the management pack after saving the changes applied to the Linked Report and re-run the report from the Reporting workspace:
Note that the Linked Report should run but may return an empty result within the first few hours of the first implementation of the Collection Rule.
If the PowerShell Script collection rule is configured correctly, its corresponding Performance Top Object Linked Report should return the top N objects as follows after a few hours: