Friday, March 21, 2014

Application Insights Deep Dive Part 8 - Alerting & Administration

This is the final post in my 'Application Insights Deep Dive' series and if you haven't already seen the previous posts, then you can check them all out here:

Application Insights Deep Dive Part 1 - Getting Started

Application Insights Deep Dive Part 2 - Building A Demo Server

Application Insights Deep Dive Part 3 - Deploying A Demo Web Application

Application Insights Deep Dive Part 4 - Monitoring Availability

Application Insights Deep Dive Part 5 - Monitoring Performance & Using Diagnostics

Application Insights Deep Dive Part 6 - Monitoring Usage

Application Insights Deep Dive Part 7 - Working with Dashboards

In this post I'll first show you how to configure e-mail alerting so you can be sure that you're kept in the loop in the event of any availability or performance related issues that might arise with your web applications. After that, you'll see how you can use the administration area to view any configuration changes to your applications and get quick access to keys and downloads relevant to your Application Insights account.

It's recommended that you have already worked through the demo's in my previous posts before working through the tasks in this one.

Configuring E-mail Alerts

There are two categories of e-mail alerting that you can configure within Application Insights:

Availability alerts - When you create a synthetic monitor availability test (as we did in Part 4), an e-mail alert can be configured to inform you of any problems with the test.

Performance alerts - Once performance monitoring has been configured (check out Part 5 to learn how), e-mail alerts can be fired when any of your thresholds are breached.

Like most things in Application Insights, configuring e-mail alerting is pretty easy and to get up and running for availability alerts here's what you need to do:

Open the console and browse to the Availability\Synthetic Monitors view.

Select the web application and synthetic monitor that you want to receive alerts on, then hit the edit button (the pencil icon) to open the 'Edit Synthetic Monitor' dialog box. From there, modify your alert criteria and enter a valid e-mail address to send the alerts to, then click OK. (see below):

To configure e-mail alerting for performance alerts, follow these steps:

Browse to the Diagnostics\Metrics view and choose the application that you want to get alert notification from.

Now click on the metric that you wish to receive alerts from and then hit the 'Configure Alert' button as shown below:

At the 'Edit Alerting Rule' dialog box, check the 'Alert if' box, change the rule options and then input a valid e-mail address. When you're ready, uncheck the 'Alert if' box, then hit the 'Save rule' button.

You can test e-mail alerting from your application by temporarily stopping the website in IIS and causing an availability outage (obviously only if your using a non-production application for testing). In a short few minutes, you should then receive an 'Alert Activated' e-mail similar to this...

Clicking the 'View Online' links from inside this e-mail will open up a scoped view of your Application Insights console to help you quickly understand the resultant issue.

When the issue is resolved, you'll then receive an 'Alert Resolved' e-mail like this one..

I think the simple visualisations in these 'Alert Activated' and 'Alert Resolved' e-mails are very useful and easy to quickly consume the status of your application - especially if you're using Application Insights in tandem with SCOM or another monitoring solution and are getting a number of e-mail alert notifications into your inbox on a daily basis.

The Administration Area

If you want to edit your alerting rules, then you can do this from within the Administration area by clicking on the 'Administer account' option (gear icon) in the top right of the Application Insights console as shown below..

Click on the 'Alerting Rules' tab and you will see all of the alert rules that have been configured for your selected application. From this view, you can then highlight an alert rule and hit the 'Configure Alert' button to get quick access for changing alert thresholds and e-mail addresses.

If you want to carry out wholesale batch updates of your alert rules, then this can be achieved by downloading a configuration file from the 'Configuration History' tab, making your changes to the file, then uploading it again to refresh the configuration and alert rules to reflect your changes.

Here's what the Configuration History tab of my application looks like....

You'll notice the Upload Configuration and Download Configuration options and if you click the Download one, you'll be presented with an XML file that contains your configuration and alert rules. If you open this file you'll find all synthetic monitors contained in the <SyntheticMonitors> section and your alert rules located in the <Rules> section as shown here..

If you want to get quick access to all of the relevant tools, agents, instrumentation keys and configuration samples, then click on the 'Keys & Downloads' tab of the Administration Area. Here, you can scroll through a centralised list of everything you need - including Java agents like the example in this screenshot:

Additional Resources

If you like what you see in my series of posts, you can get more information on Application Insights from the following Channel 9 videos that Microsoft's Charles Sterling (aka AI ninja) has put together to help give everyone an understanding of what it can do:

You can post questions and get answers for all your Application Insights problems on the TechNet forum here:

Also, you can have a read through all of the available MSDN documentation on Application Insights here:


This wraps up my 'Application Insights Deep Dive' blog series and hopefully, if you've been working through all the demo's and examples over the past eight posts, you'll now have a far better understanding of what this really cool new offering can do. Although it's just in its infancy in terms of a mature solution, I'm expecting big things for this over the coming year or two and it really does feel to me like it's the next generation of Microsoft's monitoring platform.

No comments:

Post a Comment