The PowerShell Monitoring Management Pack adds support for PowerShell everywhere that you would expect to see it within the Authoring pane of the SCOM console (i.e. everywhere there is currently VBScript).
Read More...
The PowerShell Monitoring Management pack extends Microsoft Systems Center Operations Manager (SCOM) to allow creation of PowerShell based monitors, rules, tasks, diagnostics and recoveries directly from the SCOM console using the Authoring tab. No MP authoring knowledge is required to create these - authors can leverage their existing scripts and the UI contains the samples they need to modify them to work with SCOM.
To make use of these Management packs, you will need SCOM installed and configured, monitoring your environment. From that point all you need is enough knowledge of PowerShell scripting to accomplish whatever monitoring tasks are required.
This GitHub repository contains the source files. The sealed downloadable management packs can be found here: https://download.squaredup.com/#managementpacks
To install the PowerShell Monitoring mp you will need:
Import the management pack into SCOM using the standard process.
The MP will show up as PowerShell Monitoring - Community Management Pack
.
The MPs add various templates to the appropriate Create... wizards in the Authoring tab of the SCOM console. For example, right clicking on Monitors and selecting Create a Monitor -> Unit Monitor will now include a PowerShell Based folder under Scripting.
The following table displays all templates added by this management pack:
Name | Type | Description |
---|---|---|
Run a PowerShell Script | Diagnostic | Runs a script as a diagnostic, returning text |
PowerShell Script Three State Monitor | Monitor | Runs a script and reports Healthy, Warning, or Critical based on the script output |
PowerShell Script Two State Monitor | Monitor | Runs a script and reports Healthy or Warning/Critical based on the script output |
Run a PowerShell Script | Recovery | Runs a script as a recovery, returning text |
PowerShell Script Alert Generating Rule | Rule | Raises Alerts if the output of a PowerShell script matches a specified criteria |
PowerShell Script Event Collection Rule | Rule | Collects events created and submitted by a PowerShell script |
Run a PowerShell Script on an event | Rule | Runs a PowerShell script if a specified event is detected |
PowerShell Script Performance Collection Rule | Rule | Collects performance metrics created and submitted by a PowerShell script |
Run a PowerShell Script | Rule | Runs a PowerShell script on a routine interval |
Run a PowerShell script | Task | Runs a simple script as an agent task, returning text |
Each template allows you to specify a script, and dynamically insert arguments based on the workflow target. Each template includes a sample script that already has the necessary boilerplate to work with the SCOM API, so no prior knowledge is necessary. Scripts will not be checked for correctness by the template however, so ensure you have thoroughly tested them prior to using the templates.
Arguments are passed to the script as a single string, so if you need to pass multiple arguments you should use the String
.Split
method with an appropriate separator to convert $Arguments
into an array. Remember that you can also insert values from the Targeted class anywhere into the script (i.e. into unique variables in the script body) so the main purpose of injecting values via arguments is for overrides (since the Arguments value is overridable in all templates).
Management Pack | Version |
---|---|
Community.PowerShellMonitoring | 1.1.1.2 |