Friday, March 28, 2014

MVP Cloud OS Online Event

I've just finished recording a video session for next week's UK & Ireland MVP Cloud OS Online event that will see nearly 20 different presentations being delivered online via YouTube over the course of two days by a number of MVP's.

Ireland is well represented at this event with myself, Aidan Finn, Damian Flynn and Paul Keely all entering a session. Our UK friends have a strong showing too with speakers like Gordon McKenna, Patrick Lownds, Steve Beaumont and Simon Skinner to name but a few.

Here's a snippet about the event from our UK & Ireland MVP lead - Claire Smyth:

What is MVP Cloud OS Online?

On the 31st March and the 1st April 2014, MVPs will be releasing a series of online training videos that articulate how to rapidly build and deploy apps, flexibly manage IT services, and support real-time analytics across all forms of data. They will also highlight how the Cloud OS supports people-centric IT, allowing employees to bring their own devices and enhancing anytime, anywhere productivity.

The videos (all 25-30 minutes in length) will go online consecutively from Monday 31st March through to Tuesday April 1st and you can view them using the following info:

How to get involved?!
If you're watching the videos on the Monday or Tuesday, then you can contact us using the #UKMVPCLOUD hashtag with any questions you might have.

Here's the agenda:

31 March: Transform the datacentre

1 April: Empower People Centric IT


Check out this article for more info:


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.

Thursday, March 20, 2014

Application Insights Deep Dive Part 7 - Working with Dashboards

This penultimate post is Part 7 of my 'Application Insights Deep Dive' series and if you haven't yet read over 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

In the last post we covered how to monitor your end user/visitors usage data to understand how they were accessing your applications and from which types of environments.

For this post, I'll walk through creating custom dashboards that can be pinned to a 'Favorites' area where all the data that is of interest to you is centralised and easily accessible. I'll also cover how to share dashboards and make some changes to existing ones as required.

Using the Dashboard Templates

Logon to Visual Studio Online, open the Application Insights console and browse to the 'Overview\Dashboards' view as shown below.

Now click on the green '+' symbol to open up the 'Create Dashboard' dialog box. From here, you will be presented with four different types of dashboard templates to use (Blank, Default Application, Default Developer & Agent Instrumented Application dashboards).

For this first example, we'll choose the 'Agent instrumented application dashboard' template. When you've made your choice, give the new dashboard a friendly name and then select the web application that it will apply to from the 'Application' drop-down list as shown below (we'll select our Fabrikam web application that we created earlier in this series of posts) and click 'Create Dashboard'.

This will create a new dashboard that is pre-populated with tiles and graphs containing data about your monitored web application.

Each of these tiles and graphs contain live data and they can be individually clicked on to navigate directly to scoped application views inside the Application Insights console. For example, if you click on the 'Exception Events' tile, you'll be brought to the Diagnostics\Events view for your specified application like this...

Back at the Overview\Dashboards view, if you want to edit the layout of your newly created dashboard, then no problem - it's pretty simple to add, modify or remove any of the data graphics that you see.

The first thing you need to do is to select your dashboard from the 'My Dashboards' section in the navigation bar, then click the 'Edit' button (the blue pencil icon shown below)

Now, let's say I wanted to rename my dashboard. All I need to do in editing mode is to click on the dashboard name and modify it as I wish.

Next, I might want to remove the 'Config Changes' tile. To do this, I click on the tile (still in edit mode) and you'll notice that there are three new icons on the corners of your selected tile..

Hover your mouse pointer over each one and you'll find that the top right icon is used to 'Remove', then bottom right icon is used to 'Resize' and the bottom left icon is 'Configure tile'. Click the 'Remove' icon and your chosen tile (Config Changes for me) is now gone!

Now I want to resize my 'Active Alerts' tile to fill in the blank space made by my removed tile so I'll select the tile, then hit the 'Resize' icon to give me a view like this..

To add a new tile to the 'App Metrics' section that contains multiple metrics in the same tile, click the 'Metrics' option from the top bar, then choose 'Multi-metric tile' as shown below.

This creates a new blank tile with no data inside and you can simply drag and drop it into location under the App Metrics section like this..

Click the 'Configure tile' icon down the bottom left to open the 'Configure Tile - Multiple Metric' window. From there, choose your web application from the 'Applications' drop-down menu, then click on the metrics that you want to add to the dashboard from the 'Metrics' list (as below).

Now if you click on the 'Chart' link from this same view, you should see your chosen metrics listed and the colours that they will represent in the tile.Choose your colour of preference for the metrics here.

Click on the 'Options' link to modify properties like the name, subtitle, vertical axis, colour of the dashboard and time interval. I'm going to change the dashboard colour here to make it stand out and also I'll specify that it has a time range of one week.

Hit the 'Save Configuration' button when you're happy with your changes and you should see a new tile added to the template similar to this...

When you've finished editing your new dashboard, hit the 'Save' button (which is the floppy disk icon under the dashboard name) to end the process. Your new dashboard with the modified tiles and graphs will look similar to the one below..

Creating a Dashboard From Scratch

Most of the time, using the pre-built dashboard templates will be sufficient for you to design the type of dashboards that you need, but there might be a requirement for you to just start with a blank canvas and build out your own tiles and graphs as you see fit. This is a good option if you have applications that are being monitored without the Microsoft Monitoring Agent (MMA) deployed.

To do this, you'll need to use the 'Blank dashboard' template...

Clicking on the 'Create Dashboard' button will open up a brand new but completely empty dashboard for you to work with. Click the 'Quick Glance' link and choose an option from the resulting menu (we'll go with Availability for this example).

This will create a new Availability tile with no configuration. Resize it as required, then click the 'Configure tile' icon.

Choose the application and synthetic monitor that you wish to add to the dashboard, then click the Options link to modify the name and the colour of the tile and also the time interval.

Repeat this procedure using the 'Quick Glance' and 'Metrics' links to create and customise other tiles until eventually you have the custom dashboard that you are looking for (see below for the quick one I've put together).

You can also use the 'Pin to Dashboard' link when you're browsing through metrics data to add the metric tile to your chosen dashboard as shown here.

Enter your dashboard level and target dashboard.

Here's the metrics tile now added to your chosen dashboard...

Sharing Dashboards

With Visual Studio Online (VSO) and depending on the type of subscription you have signed up for, you can create additional users for your team members to work with all aspects of  VSO - including of course, Application Insights. The basic (and free) version of Visual Studio Online that I'm using for this blog series allows for up to five free users before you need to pay a monthly fee depending on the number of additional users over five that you require.

Regardless of the number of users you have, if there's more than just yourself accessing Application Insights, you might well want to share your dashboards with those additional users and to do this is pretty simple.

To share a dashboard that you've created, click on the drop-down arrow beside your dashboard's name, then choose the 'Move to shared dashboards' option as shown below.

Once the dashboard is moved, any user with access to your Visual Studio Online account can easily view the dashboard from the 'Shared Dashboards' link as you can see from the screenshot.

Creating and Sharing Favorites

If you've created a large number of dashboards, you might want to save some of them as favorites for quick access and viewing and this is easily achieved by clicking on the drop-down arrow beside the dashboard name and this time, choosing the 'Add to my favorites' option as shown.

If you want to share some of your dashboards as favorites (maybe you're the only one that creates the dashboards and then everyone else just consumes them from a shared favorites lists), then from the 'Shared Dashboards' section, click the drop-down arrow beside your shared dashboard and choose the 'Add to shared favorites' option as below.

So that pretty much wraps up this post on dashboards. In Part 8 (which is the final post in the series), I'll go through some of the options for email alerting, configuration and additional resources.

Tuesday, March 18, 2014

Application Insights Deep Dive Part 6 - Monitoring Usage

This post is Part 6 of my 'Application Insights Deep Dive' series and if you haven't yet read over 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

In the last post I explained how you can monitor the performance of your applications from the cloud and walked through how to troubleshoot some of the issues raised by using the diagnostics view to help reduce your mean time to resolution of those same issues.

The focus of this post will be to help you gain valuable insights into the usage data of your applications so you can see statistics like top pages, number of page views, events and even slowest requests. You will also get information that helps you to understand the type of environments your end-users and customers are running when using your application. For me, this is probably the coolest service that Application Insights can deliver and if the availability and performance side of it doesn't rock your world , this should definitely be something of interest!

Configuring Usage

To get usage data for your application, you'll need to add some JavaScript code to it so Application Insights can start collecting this type of data. The process for configuring usage monitoring varies slightly depending on the type of application you are running (web site, web service, Windows Phone 8 app or Windows Store app) and for the purposes of this demo, I'll be walking through configuring the Fabrikam Fiber web site application that we deployed in my previous posts.

Logon to Visual Studio Online, open the Application Insights portal and click the 'Usage' view from the navigation bar.

Ensure your web application is selected from the drop-down menu, then click the 'Web site' button (or whichever button is relevant to your application type) as shown below.

You will be presented with five steps to help get your usage data configured and for now, we'll just move straight to Step 3 where we'll first make a copy of the JavaScript snippet provided.

Now logon to the server that's running your web application (this would be the demo web server that we created in Windows Azure in Part 2) and using Windows Explorer, browse to the location you've deployed it to (by default it should be C:\inetpub\wwwroot\Fabrikam).

Expand the 'Views' folder, then open the 'Shared' folder where you should see the '_Layout' CSHTML file. Right-click this file and edit it with a text editor such as Notepad++ as shown below.

Now, if you read the instructions from Step 3 of the Application Insights console where you copied the code snippet from, it tells you:

To collect usage data about your application, insert the following script into each page you wish to track. Place this code immediately before the closing </head> tag and before any script.

So we'll do just that and copy in our code snippet as shown in this graphic:

Once you've copied in the code snippet, save and close the file, then open up Application Insights again. Now all you have to do is to wait 20 or 30 minutes and your application should start lighting up in the Usage view.

Using the Application Insights Tools for Visual Studio 2013

An alternate (and even cooler) method of configuring your application for usage is to use the free Application Insights Tools for Visual Studio 2013. This option is only applicable when you've installed a local copy of Visual Studio 2013 and if you've already configured your application for usage monitoring by copying the code snippet from the steps above, the this method is not required.

To use the Application Insights Tools for Visual Studio 2013 (currently in preview), from the computer that you have Visual Studio 2013 installed on - open the Usage view from the Application Insights console, select your application type (web site for us), then click the download button from Step 1 as shown below.

This will open the download window for the tools....

Download the installer, run through the wizard...

Once it's finished, open your web application inside Visual Studio 2013 and right-click on the application from the Solution Explorer window to see the following context menu:

Click on the 'Add Application Insights telemetry to Project...' option and you'll be presented with this wizard...

Hit the blue button down the bottom of the wizard and the packages will be automatically downloaded and deployed to your web application.

Now wait for 20 - 30 minutes and your usage data will start showing up in the Application Insights console.

Exploring the Usage Views

Once you've configured your web application for usage monitoring, you can open the Application Insights console and click on the 'Usage' link to be presented with the 'Features\Top Pages' view as shown below:

Here you get a daily trend of Activities, Sessions, Unique Users and which pages they are accessing over a given period of time (you can modify the time range from the drop-down menu on the left).

Clicking on the 'Page Views' link from the navigation bar on the right-hand side will open a graph and table like this..

From the table above, you can see which pages your users are hitting and get statistics like the Average Number of Unique Users per day. You'll also see deployment markers in this graph which can come in quite handy before or after a new build.

Clicking on the 'Details' link (highlighted) from the same graph opens an hourly trend analysis of page views and sessions, performance counters and metrics.

If you click on the 'Events' link from the navigation bar, you'll be presented with events that have been logged by the client application and server, though this data is defined by the application itself and is up to the developer to decide on customisation.

Clicking on the 'Event Insights' link will enable you to analyse events so you get an understanding of how that event changes over time.

Another useful view is the 'Slowest Requests' one. Clicking this link gives you  information on the average page load times (from the client application experience) of each page on a given date or time.

User Information

If you want to gain insight into data about the type of users that are visiting your web application, then click on the 'Users' option from the top navigation bar and select the 'Active Users' link from the left-hand side to get the following view:

From here you get information like the trend of active daily users, the frequency of their visits, the percentage of new visitors versus returning visitors and even their engagement level - which will show you how active your users are when they visit the site.

The links to the right of the 'Trend of active users by day' graph are live and you can click on them to change the data that the graph shows as below..

Clicking the 'Authenticated Active Users' link on the right will display similar information with the exception that it is targeted only at users that have been authenticated within the application.

If you want to dive into the 'Loyalty' view from the navigation bar on the left, you will be presented with a number of graphs and charts that show visitor loyalty and return trends like these examples..

Environment Types

Clicking on the 'Usage\Environment' links from the top navigation bar will take you to one of my favourite views in Application Insights.

It's here that we can see the different environment types that are being used to access our applications such as:

Operating Systems


Global Locations

Even the language that your users are viewing in..

So that pretty much wraps up Monitoring Usage in Application Insights and in Part 7 I'll discuss working with Dashboards.