SCOM: Configure a monitor recovery task for a healthy state

During a recent project a client had a small request to create a monitor and run a command when a device was not accessible anymore. Easy right! But (yep there’s always a but) they wanted to run a command when the monitor was returning back to a healthy state to restart a service when the device came back online… Hmmm and all in 1 monitor. So the conditions were as follows: Monitor: Action: Run a PowerShell based monitor to test the connection with the device BAD: Device is down => Run recovery task to remediate GOOD: Device is up again => Run recovery task to restart service (note: Always do this small matrix of a monitor design to exactly know what the customer wants) I don’t have the device to simulate but came up with a small example in my lab to show you how to get this working with just 1 monitor. The situation in my lab is very simple. I want to turn on my...
Read More

SCOM: Creating a PowerShell script monitor with Silect MPAuthor

Sometimes it’s necessary to create a monitor to monitor something which is not included in the standard management packs. Unfortunately it’s not possible in SCOM  to use PowerShell to crerate a script monitor in the scom console. Although it’s not a good idea to start authoring in the operations console it sometimes can be a quick and easy way to create a monitor. Recently Silect Sofftware released a free version of MPAuthor to create your management packs. I’m using this to create my script monitors to collect and monitor the data which I use in my monitoring my home series: http://scug.be/dieter/2014/02/19/monitor-your-home-with-scom/ Download the tool here: http://www.silect.com/mp-author Below is an example of how I monitor the target temperature set on my Nest Thermostat. So open the tool and create a new management pack => Create New Script Monitor… Name the script (if you have the script somewhere as a PS1 file it will load the script body automatically. This is the script I’m using: [xml] param([int]$maxtarget) [void][system.reflection.Assembly]::LoadFrom(“C:\Program Files (x86)\MySQL\MySQL Connector...
Read More