Showing posts with label DevOps. Show all posts
Showing posts with label DevOps. Show all posts

Saturday, September 22, 2018

SCOM - GSM to Azure Application Insights Migration Walkthrough (Part 1)

In my previous post, I talked about the recently announced retirement of the Global Service Monitor (GSM) feature and the need to start migrating your existing web application tests to Azure Application Insights. In this post, I'll walk through the migration process to help get you started.


Prerequisites

The migration script has the following prerequisites:
  • Azure Subscription -  your subscription name can be found in the Subscriptions view within the Azure portal.
  • ResourceGroupName - refers to the resource group in Azure where all the tests will be migrated to. If you don't have a resource group created in Azure, the script will create a resource group with the name you provided in the parameters.
  • ResourceLocation - refers to the location of the resource group metadata in Azure.
  • Azure PowerShell Module - needs to be installed (download available here). Be aware that his module requires PowerShell version 5 or higher to be installed so if you're installing on a Windows Server 2012 R2 server, there's a good change that you'll need to reboot to meet this requirement.
  • SCOM PowerShell Module - needs to be installed if you're running the script from anywhere other than a SCOM server (installer can be found on the SCOM media).
  • Internet Connectivity - you'll need a working internet connection on the computer that you choose to launch the migration script from.

Limitations

You'll also need to be aware of the following limitations in Application Insights:
  • Application Insights has a maximum capacity of 800 web availability tests per resource group and there's a limit of 100 web availability tests for each application component you need to monitor.
  • GSM allows you to enable alerts based on a specific HTTP status code. For HTTP status code 200 in Application Insights, you will see a Success returned and for all other codes, they will show a Failure.
  • GSM allows you to create Alerts on content match. Application Insights only supports the 'Content must contain' parameter.
  • GSM allows Performance monitoring for a website based on a number of performance metrics (shown in the following screenshot) however, Application Insights does not have a mapping to automatically collect these performance metrics for websites. You would only see the Response Time for tests; the other Performance metrics on the list will not be monitored.

Reviewing GSM Test Configurations

Before you kick off the migration script, it'd be a good idea to take a note of the existing configuration settings of your GSM tests in SCOM so you can validate those configuration settings come over to Azure Application Insights. For my demo SCOM environment, I've currently got the following two GSM web application tests configured....


One of these GSM tests performs external monitoring for a legacy demo web application (DinnerNow) that I sometimes use in my Application Performance Monitoring (APM) presentations and the other GSM test is monitoring the URL to this blog. In the following few screenshots, we'll dig into the configuration of the GSM test that's monitoring my blog URL.

This screenshot shows the actual URL that is to be monitored with GSM....


Here, we can see all of the external locations that GSM is configured to monitor my blog URL from. I've chosen five different locations around the globe and my expectation would be that if I migrate this test up to Azure Application Insights, these locations would be configured there as external monitoring points for the test.


In the next screenshot, I get a summary of the test locations along with an understanding of the Test Frequency (1 hour) and estimated monthly external transaction count (3,600). The lower I configure the Test Frequency setting here, the higher the number of monthly transactions. Again, these configuration settings are something that I would expect the migration over to Azure Application Insights to retain.


Here's a final summary of the configuration settings for my external blog URL monitor....


Once you've confirmed the configuration settings of your existing GSM tests, it's time to get down to the migration stage.

Note: Keep in mind that if things go horribly wrong with the migration, your existing GSM tests still remain unchanged in SCOM and there's no 'point-of-no-return' stage whereby you have to confirm deletion of them.

Running the Migration Script

The following steps will walk you through what you need to do to get the migration of your GSM tests to Azure Application Insights kicked off (these steps assume you have all prerequisites configured and in place)..

Login to your subscription in the Azure portal and create a new resource group to be used for the newly migrated GSM tests.

Note: Manually creating a new resource group is an optional step and the migration script will do this automatically for you if you have specified a resource group name that doesn't exist. For testing purposes, I prefer to keep control of where my resources are created and if things go wrong with the migration, I can always then just delete the resource group and start again.

Here's a screenshot of a new empty resource group titled GSM2AppInsights - which I've created specifically for this migration demo...


Save the script from the Microsoft Download Center here to a local folder on the machine that you want to run the tool from (we’ll use a SCOM Management Server in this example).

Launch a PowerShell session with Administrative permissions, browse to the directory that you’ve saved the script to and run the following command (example shown in the following screenshot):
.\MigrateGSMToAI.ps1 -SubscriptionName "<AZURE_SUBSCRIPTION_NAME>" -AzureResourceGroupName "<RESOURCE_GROUP_NAME>" -ResourceLocation "<RESOURCE_LOCATION>"


At the Security Warning prompt, type R to run the script once as shown here....


When the Sign in window presents itself, key in the relevant credentials with access to the Azure subscription you wish to migrate the GSM test to.


After the script launches, you'll be presented with various pieces of information on its progress - similar to what's shown in the following screenshot....


The script shouldn't take too long to run (dependent of course, on the number of GSM tests you have to migrate) and soon, you should be presented with a message stating that everything has been migrated successfully along with a reference to where you can find the migration log file.


If I browse to the location on my server where the log file can be found, I can see that there's a specific log file for each migrated GSM test as well as the MigrationLog.txt file shown here...


Clicking in to MigrationLog.txt gives me confidence that my tests have all been migrated to Azure Application Insights successfully.


Confirming the Migration

Once the script has completed and the log files have been checked, it's time to jump back into the Azure portal to take a look at our newly migrated GSM tests.

In the following screenshot we can see that the script has created two new Azure Application Insights web application tests within my GSM2AppInsights resource group.


After a short while of waiting, I can see each of my GSM tests light up with availability data. Here's the two migrated GSM tests now actively monitoring web availability within Azure Application Insights...


From there, I can pivot into the specific web availability test that I had configured to monitor my blog URL. All of the external locations that the original GSM test was configured for can now be seen as monitoring locations within Application Insights as shown here....


If I edit this test, I can see all of the original settings that I had in GSM have been migrated over.


Clicking on any of the green (or red) dots from within the Application Insights availability test view, I'm presented with an End-to-End view of the transaction - including details about each of the response headers the test has encountered (awesome!)


Conclusion

After working through this migration process from start-to-finish in less than an hour, I can confirm that the GSM migration script works really well and as expected. The script leaves your existing GSM tests in place and working back in SCOM so if things don't quite work out for you the first time round, you can always delete the resources in Azure and start it again.

In my next post on this topic, I'll walk through configuring Azure alerts for the newly migrated web application tests along with demonstrating how to get visibility of these tests back in SCOM using the latest Azure Management Pack.


Wednesday, October 1, 2014

Awarded Microsoft MVP 2014 for Cloud and Datacenter Management!

I've just seen 'the email' that all MVP's anticipate every 12 months - which is when their existing MVP is up for renewal.

I'd nearly forgotten that today was my own renewal day as I was busy delivering some webinars on DevOps to the community.


Thanks to all my friends and colleagues that I've worked with and shared knowledge on CloudOS with over the last year - it's great to see the 'Number of MVP Awards' counter on my profile go up by one each year!

I'll be at the MVP Summit in November and if you've been renewed or are a first time MVP awardee, then we might catch up over there for a beer! For now though, I'll just bask in my own glory for an hour or so!

Tuesday, September 30, 2014

Join My Upcoming "From Dev to the Datacenter" Webinars on October 1st and 2nd

Tomorrow (October 1st) and Wednesday (October 2nd), I'll be delivering two webinars in conjunction with Savision to discuss the content of our recently released free whitepaper titled: "From Dev to the Datacenter"


We will be presenting the same content in each webinar and you have a choice of timezone depending on where you're located:

US Timezone: Wednesday October 1st, 2014 at 5pm CEST/ 11am EDT

EU Timezone: Thursday October 2nd, 2014 at 3pm CEST/ 9am EDT

During the webinars, you'll see some cool demo's that should help to reinforce how System Center, Visual Studio Online and Savision can work with you to support your DevOps scenarios.

We'll also leave some time for Q & A so feel free to drop by and hit us up with any questions you have on these awesome technologies.

You can find more information on registration for either webinar here and if you haven't yet had a chance to download and read through the free whitepaper, then you can do so from this link.

Hope to talk to you all then!

Tuesday, September 9, 2014

Just Released - Free DevOps Whitepaper - 'From Dev to the Datacenter'

Things have been pretty quiet on this blog lately due to all my spare time being taken up with some really cool projects in work, preparing for my two System Center Universe Europe presentations and putting the finishing touches to a whitepaper collaboration that I've been working on with Savision.


The new whitepaper has just been released and in it, I speak about leveraging System Center and Visual Studio Online to help you with your day-to-day 'DevOps' scenarios. Here's an abstract:

"When your critical business applications start performing badly, it’s often difficult to quickly pinpoint whether the problem lies with the infrastructure or the developers’ code. 

If you’re tired of trawling through consoles and log files full of alerts to find the root cause of a service outage, then this white-paper will show you how to leverage Microsoft’s System Center and Visual Studio Online cloud solutions to get a full 360 degree view of your applications.

With this knowledge, you’ll gain the confidence to work with your developer teams to bring a rapid conclusion to your application problems."

Targeted at both IT Pro's and Developers, the aim of this whitepaper is to bring about a better awareness of how we can use components of Microsoft's CloudOS story to help make everyone's life a little bit easier!

Interested? If so, then you can get your hands on the whitepaper here:

http://www.savision.com/free-whitepaper-dev-datacenter

When I return from System Center Universe, I'll be working with Savision to deliver two live webinars where we're going to expand a little on the topics covered in the whitepaper and we'll also give people an opportunity to get their questions answered.

Hope you like the content and if you're attending System Center Universe next week, make sure to check out my 'Hybrid Cloud DevOps with APM' presentation to see some of this cool stuff in action!