For a clearer picture

Part 2 – Global Service Monitor Migration Script

Part 2 – Global Service Monitor Migration Script

It is important to migrate your GSM scripts using the migration tool as this will tag the Azure Application Insights tests in a way that ensures that you do not have to pay for them. If you manually recreate your GSM monitoring as Azure Application Insights tests then you will fall under Azure licensing charges.

I have only tested the migration script with taking basic URL web tests from SCOM to Azure Application Insights (ping tests). These are generally very basic tests on whether a URL is available along with the response time and the option of content matching and checking returned status codes.

I found the whole process very straight forward and after many tests; I have never seen it fail. I have not however tried to migrate Visual Studio Web Tests. If I find some time I’ll give those a go later.

Let’s take a look at my GSM Tests

I have 2 tests configured:

Each test has 2 distinct URL checks:

Which are monitored from 5 locations:

And I want an alert if the transaction response time is greater than 5 seconds; if the return code is greater than 400 or if the content match doesn’t contain specific text. I’m also collecting performance data. Take note of these settings as when you move to Azure Application Insights the options are much more limited.

So; let’s run the Migration Script.

First up; if you don’t have the Azure PowerShell module installed, you’ll need to get this configured. Here is the walk through.

Install-Module -Name AzureRM

I then connect to my Azure Subscription to confirm some details;

I’ve cropped them out of the screenshot but make a note of the subscription name.

And then we can run the GSM Migration Script. Best practice naming conventions for Azure Resources are listed here.

MigrateGSMToAI.ps1 -SubscriptionName "**Subscription Name**" -AzureResourceGroupName "**Resource Group Name**" -ResourceLocation "**Location**"

And you can watch the migration take place:

And then there are the log files that you can review if there are any issues. I’ve never had the script fail.

Azure Application Insights Resource

Fire up the Azure Portal and go to your Application Insights resource and you’ll see the migrated Global Service Monitor tests.

My initial concerns is that all GSM tests are migrated to a single Application Insights resource. I can’t see anyway to slice and dice this as part of the migration. However, it is possible to run the Global Service Monitor migration script multiple times and you could then edit the resulting Application Insights Resources in the Azure portal. A bit of a pain; it would be neater to be able to do this as part of the migration script.

Viewing Test Data

If you click on the Availability blade then you can see your tests in action.

You can then click on an individual test and see more detailed results.

You can also click on edit test and change the configuration:

  • Test Name – this cannot be edited so you need to get this right in SCOM before the migration.
  • Test Type – this cannot be edited; it is set by the type of Global Service Monitor test you migrated. As my GSM tests were basic URL checks (not Visual Studio Web Tests) they have been migrated as URL Ping Tests.
  • The URL – this can be edited.
  • Test Name – this cannot be edited so you need to get this right in SCOM before the migration.
  • Parse dependent requests – embedded resources such as links and images are parsed.
  • Enable retries – if the test fails then the number of times to retry before a failure is reported.
  • Test Frequency – every 5, 10 or 15 minutes.
  • Test Locations – taken from the Global Service Monitor configuration and can be edited in Azure.
  • Success Criteria – this gives a few options but a lot less than was available in Global Service Monitor. These are quite disappointing:
    • – Test time out greater than 30 seconds (with options of 60, 90 or 120 seconds). This is not the same as setting an alert on response time which can be in either in Azure alerting or via the SCOM Management Pack.
    • – HTTP response – status code =
    • – Content Match – must contain
Quick review

I noticed that the shortest test interval schedule is every 5 minutes. I think this is a lifetime in terms of web site availability but this is a like for like setting with Global Service Monitor.

Leave a Reply

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