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:
Add the Reference to the Library
Once there, add a new item:
Pick Snippet Template:
Past the contents above and save it:
Now add a new item:
Don’t forget to name it properly.
Select the Snippet:
Configure as below:
Save it and…
Ta da! There you go!
let’s build this:
And here’s our output:
I don’t like those underlines there,so, let’s fix this:
After a new build:
Let’s import the library into SCOM:
Once imported, if you need authentication, set the Run As Profile:
Now, let’s import the MP with the monitors:
You should see the monitors here:
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:
Hope this one helps!