If you use Microsoft’s Global Service Monitor (GSM) in SCOM you may have run into something like this recently:

Description:
The health service HTTP module in management group “<MGNAME>” failed to resolve service’s DNS. Please check configuration settings. Provided configuration: Service Url https://b850bab6-61d9-4262-838d-ad4e82b6a6e2.ods.opinsights.azure.com/DiagnosticsDataService.svc/PostDataItems. Proxy Provided .

This error indicates an underlying issue with GSM. While this may be addressed going forward, this represents a good time to show that there is another option – Application Insights!

What is Application Insights?Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms. Use it to monitor your live web application. It will automatically detect performance anomalies. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app.” – per https://docs.microsoft.com/en-us/azure/application-insights/app-insights-overview. As a good starter on App Insights check this video out.

In this blog post we will cover the following:

  • How to use Application Insights to monitor non-Azure web sites
  • What visualizations do you get from using App Insights for a URL Ping test
  • Providing a deep level of monitoring for Azure based web applications with App Insights
  • Generating alerts for these websites
  • Reports available for these websites

FYI – you can also use Azure Automation to perform synthetic web tests which I previously discussed in this blog post.

 

How to add monitoring for non-Azure web sites:

It is simple to add monitoring for web sites whether they are or are not running in Azure with Application Insights. From a high level you add Application Insights, and then create a web test.

How to add a non-Azure web application to Application Insights:

  • Add Application Insights in your Azure subscription. Details:

In the Azure portal, go to More Services and choose “Application Insights”

In Application Insights add.

Provide the name, type (General for non-Azure based websites like this), the subscription, resource group, and location.

  • Next add a web test in Application insights (for more details see this article).

This can be done as a URL ping as shown below (simple up/down testing for the website).

Or you can create a Multi-step web test (where you upload a .webtest file). If you are using GSM you may already have a .webtest file, if not see https://technet.microsoft.com/en-us/library/jj860376(v=sc.12).aspx for details on how to create one of these files.

What visualizations do you get from using App Insights for a URL Ping test?

Once your test has been running for a while you can see available metrics such as the one shown below.

Or test duration metrics.

These can also be combined into a single view which shows availability and duration of the tests.

Please note: Any of these views can also be pinned to a custom dashboard like the one shown below by using the pin option (). Sometimes you need to open another icon like the one shown below to expose the pin, and other times right-clicking will give the option.

A sample dashboard using this same data is shown below.

That’s not bad for 5 minutes of work! The key to remember on these is that we are adding metrics to “Availability” when we add a synthetic web test like this in Application Insights.

 

Providing a deep level of monitoring for Azure based web applications:

If you have an Azure based web application (or if you configure your application to have deep integration with App Insights) you can not only monitor availability (like we discussed in the previous section) but you can also add live metric streaming, user information, smart detection, and application mapping.

The high level view shows some of these performance metrics.

Live Metric Streaming:

Using Live Metric Streaming you can watch metrics for your site in real-time. This also includes sample telemetry for calls to the website.

Application mapping:

Application Insights can automatically map out the application and how it communicates as well as providing details on failures which have occurred at each level of the application.

There a wealth of information available from Application Insights in this type of a configuration. I highly recommend checking it out.

 

Generating alerts:

You can add a metric alert or activity alert directly from the alerts pane.

It’s simple to add rules which alert on conditions that you want to notify such as when the website is not available (shown below).

You can even run a logic app based upon an alert occurring.

Tip: This approach may be an easy way to send information to SCOM so that when an alert occurs in Application Insights SCOM is notified that the alert occurred.

A sample alert that I was already receiving when one of the sites was down is shown below.

For more details on alerts see: https://docs.microsoft.com/en-us/azure/application-insights/app-insights-alerts

 

Reports:

On a weekly basis I receive an email on the websites which I monitor. A sample of this is shown below.

The important part of this report is at the bottom where it tracks overall availability and average response time.

 

Summary: If you are looking for a quick way to provide synthetic transactions for your websites (in or out of Azure) which will allow you to have pre-built visualizations, alerts and reports check out Application Insights!  I would like to thank both Flemming Riis and Kevin Greene for their insights on this blog post. You guys rock!