Configuration Performance Software Testing Troubleshooting

SCOM – Global Service Monitor Using Visual Studio Web Test

Global Service Monitor has been around for quite some time now. If you never heard of Global Service Monitor then I would like to give you a short description by Microsoft.

System Center Global Service Monitor is a cloud service that addresses this problem by extending the application monitoring capabilities in System Center 2012 beyond your organization’s own network boundary. Global Service Monitor uses Windows Azure points of presence to help give you a true reflection of an end-users’ experience of a web application.

System Center Global Service Monitor helps achieve a 360-degree view of the health of web applications. It uses Windows Azure points of presence across the globe, monitored alongside existing data found within the familiar System Center 2012 Operations Manager console. Global Service Monitor reports on availability, performance, and function of web applications by scheduling and executing synthetic transactions against the application from Windows Azure. (Source: Microsoft)

This pretty much explains it well enough. If you need some more info check out the GSM site.

On the http://www.vnext.be blog Christopher Keyaert has a pretty long blog post written to get you up and running with Global Service Monitor and provides all the necessary links for prerequisites and downloads. He explains also how to setup a Web Application Availability Monitor which uses the GSM locations.

One feature that I haven’t seen people using a lot are web tests to get detailed application information from outside their networks.

What are Web Performance and Load Test / web tests anyway?

A web performance test (previously “web test”) consists of a chain of HTTP requests. Web testing has been supported in Visual Studio Team System ever since the 2005 release, but Visual Studio 2010 offers key improvements. Web tests work at the protocol layer by functioning with HTTP requests. So, web tests do not run client side scripts, but events as performed through JavaScript can be simulated at runtime with assistance of customization using test plug-ins, request plug-ins, extraction rules, or coded web tests (also recognized as declarative web test). Web performance tests are used to test the functionality of web applications and to test web applications under load. Web tests are used in performance testing such as capacity, stress and performance tests. Web performance tests are driven at the HTTP Layer to enable creating high loads with a fairly low amount of hardware; web performance tests do not instantiate a browser. (Source: TechNet wiki )

What do I need to create a web test?

The easy way is you get a copy of Visual Studio Ultimate edition or you could use also Notepad. If prefer using Visual Studio Ultimate edition. If you hurry up you will be able to get a free trial license for Visual Studio Online on http://www.visualstudio.com . Just sign up and you will receive a 90 day trial license.

image

How do I start creating a web test?

Ok, let’s assume you installed Visual Studio 2013 Ultimate edition and you started it for the first time.

Select New Project and choose Web Performance and Load Test project and give it a meaningful name like BlogPerformanceTest…

image

In the solution explorer I renamed  the *.webtest file to BlogPerformanceTest.webtest. This is optional…

image

Your window should look similar to this. Right click on the BlogPerformanceTest node and choose Add Recording…

image

If you are lucky, your browser will start and you might get a pop-up to enable Add-ons, enable both of them…

1

The browser will open and on the left side, you will notice the Web Test Recorder. It is already in recoding mode, so we can start with our steps…

  1. Type the URL http://stefanroth.net
  2. Type a search term like linux into the the search field
  3. Click Search
  4. Finally click Stop

Notice each step is being recorded. Of course do any clicking on any site which suites your needs…

image

Note: It could be, that you run into an error when you click Stop. The error appears like this…

2

In my case it helped copying the RecorderBarBHO100.dll into C:\Program Files\Internet Explorer directory. Here two links which deal with this problem here and here.

After you stopped the test, you will see many URL’s which were returned from my blog. If you want to view your recorded test click Run Test…

image

Now all your recorded steps are played in the same order as you recorded them. For each test you see also performance information like Request Time, Status etc…

image

Now, as this probably works, I would like to add a Validation Rule which checks my Request Time and sends an error if the Request Time is higher than the threshold. Click Add Validation Rule

image

Select Maximum Request Time and I set the value to 670 ms. I got this value by running the test several times and checked the request time. Doing so, I figured out when the rule would break…

image

Then I ran the test again and voilà an error…

image

Next go to the Solution Explorer, select the project and right click Open Folder in File Explorer….

image

Copy the file to your SCOM server or any other computer which has the SCOM console installed…

image

How do I use Web Performance and Load Test and Global Service Monitor?

Important: Before you continue, make sure you configured the Alert Attachment MP properly. It is essential that you configure a file share, RunAs profile and that you enable the discovery rule for the file share. There is a TechNet article which describes these steps in detail and an excellent blog post from Marnix Wolf for some FAQ. If you don’t do these steps, you wont get the test results back from GSM.

If you have configures all the steps, you are ready to continue…

Open the SCOM console, go to Authoring/Management Pack Templates and start the wizard. Select Visual Studio Web Test Monitoring…

image

Choose a name and a new management pack to store the configuration…

image

Click Add… and select your BlogPerformanceTest.webtest file. I changed also the Name

image

Next, choose the locations you want to run the tests from. Just select a couple of them…it’s free :)…

image

Click Next

image

I clicked Change Configuration… and set the test frequency to 5 minutes (just because I don’t like to wait), which is the lowest value possible…

image

Finally click OK, Next and Create

image

Now, you should see the configured template….

image

How does it look in SCOM?

After you configured the MP template it takes some time for the objects to appear. Go to Monitoring and open Visual Studio Web Test Monitoring folder, check if you have already your tests up and running….

image

First some Test States

image

Check the Summary Dashboard Map…

image

If you open the Test Result Dashboard you will see each GSM location and the result. …

image

Click Download test result file task…

image

And finally you see all detailed test results…

image

If you go to the alert view, you find alerts for the locations, where the threshold exceeded the 670ms…

image

Open HealthExplorer and you get more details…

image

Select an alert, click Alert Attachment Location task and Windows Explorer will pop up pointing to the file location …

image

These files you are able to analyze in Visual Studio again…cool!

image

This post should you give you a pretty good kick-start. Web tests are more a programmer / developer thing, but I think it is important for each IT admin who uses SCOM to understand, what it is all about and if you want to know more about web tests, I think it is time, to ask your developer if he would like to have a coffee with you :)…

One last thing, the Alert Attachment MP got updated in the last few Update Releases (UR1 and higher) . Make sure you have the latest UR installed and the latest Alert Attachment MP imported.

Have fun!

3 Replies to “SCOM – Global Service Monitor Using Visual Studio Web Test

  1. Hi Stefan,
    I have a coded VS webtest, which I want to use in GSM monitoring. Looks like it can only accept VS webtest so I tried calling coded webtest from a webtest but cannot add it to GSM in SCOM. Do i have other options.?

  2. I have a similar problem as maniishpawar, is there a way to atleast use GSM monitoring for a Webtest driven by a CSV datasource

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.