Custom URL Monitoring Library for SCOM 2012

Recently, a customer that uses the SCOM URL monitoring extensively reported a few issues they had been having with the standard URL (Web Transaction) monitor. Some of them were resolved by using the new availability template (repeat count). However, the latter won’t support authenticated URL queries. In order to fix that, I have developed a small URL Monitoring library. You can get it here. Below, find an example VSAE snippet and a small step by step on how to use it.

I have learned a great deal about the ‘invoke-webrequest’ cmdlet. By the way, make sure the watcher node you select by override is at least a Windows Server 2012 (Powershell 3.0 is required for this cmdlet). Additionally, the MP is ONLY compatible with SCOM 2012, since it uses certain components only available in SCOM 2012, namely, the SuppressionSettings in the System.ExpressionFilter .

Here’s the snippet.

The monitor (and web performance rule) accept the following parameters:

<url>#text(‘url’)#</url> –> the URL. Easy.
<timeout>#text(‘timeout’)#</timeout> A timeout for the operation. If the request takes more than this, the monitor will fail.
<matchingstring>#text(‘matchingstring’)#</matchingstring> [Optional] A string to match to consider the monitor as VALID!
<Interval>#text(‘interval’)#</Interval> The interval between the URL checks
<SyncTime>08:00</SyncTime> Synctime. To make things next or if you want, say do it daily or do it 3 times a day, starting 8:00AM for example.
<matchcount>#text(‘matchcount’)#</matchcount> How many time the monitor must fail before triggering the Alert.
<withinseconds>#text(‘withinseconds’)#</withinseconds> How far back should I look to consider the failures, say, 180 seconds or something the like. Usually will be matchcount * interval.

<debug>0|1</debug> – [Optional] enables or disables debug. Default is disabled.

Having the snippet handy, create a new VSAE project:

image

imagename it…

Add the Reference to the Library

image

image

Once there, add a new item:

image

Pick Snippet Template:

image

Past the contents above and save it:

image

Now add a new item:

image

And select:

image

Don’t forget to name it properly.

Select the Snippet:

image

image

Configure as below:

image

Save it and…

image

Ta da! There you go!

let’s build this:

image

And here’s our output:

image

I don’t like those underlines there,so, let’s fix this:

imageand

image

After a new build:

image

Much better.

Let’s import the library into SCOM:

image

image

Once imported, if you need authentication, set the Run As Profile:

image

image

Now, let’s import the MP with the monitors:

image

You should see the monitors here:

image

You should also see a performance collection rule, which also needs to be enabled, using an override. When added to a view, it should look something like this:

image

Hope this one helps!