Collect SharePoint telemetry with Azure Application Insights. Part I. Server-Side

Microsoft Azure provides a lot of services and some of them may be used even you prefer on-premise based application.

With this post, I start the series of three posts about Azure Application Insights and implementing it in your SharePoint on-premise environment. It will be helpful, no matter which version of SharePoint you use, Server or Foundation, old 2010, or modern 2019.

Application Insights

Application Insights is an Azure-based service (you can't download it and install in your environment) allowing you to collect usage data of your live applications. Once data is collected you have extra features such as performance anomalies, an abnormal rise of exceptions, and others.

Azure

Azure-based service means you need to have an active Azure subscription. In case you don't start from here: https://azure.microsoft.com/en-us/free/. It should not take long.

If you have an Azure subscription and SharePoint (single server or farm) you are ready to go.

Create Application Insights

Create new Application Insights in your subscription choosing the data center closest to you:

Create new Application Insights resource

Create new Application Insights resource

SharePoint Farm

I have the following test SharePoint 2019 Farm where I'm going to implement monitoring:

Test SharePoint 2019 Farm

Test SharePoint 2019 Farm

There are four servers in my farm:

  • Office Online Server
  • Application Server
  • Web Fron-End Server
  • SQL Server

The first three servers will be covered with monitoring. I'll set up it for all SharePoint-related IIS applications and services. SQL Server is not monitorable with Application Insights.

Info
Application Insights service allows tracking dependencies such as the execution of SQL-query.

Web Platform Installer

To implement monitoring with Application Insights we need to install it on every front-end and application server in the SharePoint Farm. There is a simple approach to achieve it: use Microsoft Web Platform Installer. Download the extension and install it on your server.

After installation, find it by typing "web platform" in the start menu.

Web Platform Installer

Web Platform Installer

In the platform installer type in "application insights" in the search box, click Add next to Application Insights Status Monitor and then click Install to start the installation.

Web Platform Installer

Web Platform Installer

Once Application Status Monitor installed it will be launched automatically.

Application Insights Status Monitor

Sign in your Azure account. It's necessary in order to get a list of existing Application Insights or create a new one.

Application Insights Status Monitor

Application Insights Status Monitor

In my case, I use a single Application Insights service for all servers and IIS applications on my farm.

Select an application you want to monitor in the list and click Add Application Insights

Application Insights Status Monitor

Application Insights Status Monitor

After setup telemetry collection restart IIS to apply changes.

Application Insights Status Monitor

Application Insights Status Monitor

Repeat these steps on all servers and the implementation will be done.

Implementation checklist

Summarizing what needs to be done here is a checklist:

  1. Setup Azure Subscription
  2. Create Application Insights resource
  3. For each APP and WFE server in a farm:
    • Install Web Platform Installer
    • Install Application Insights Status Monitor
    • Enable Monitoring for IIS application
    • Restart IIS

Features

Now we can use Application Insights functionality. I'll describe some features.

Performance

The performance section allows you to see what operations and requests are slowly within your environment. Also, you are able to drill into a specific request to investigate the end-to-end transaction with all dependencies.

Application Insights Performance

Application Insights Performance

Failures

This section makes it possible to figure out what is wrong with your SharePoint farm and use a proactive approach to detect and solve problems.

Advice
Use the Failures section to know about problems with SharePoint to prevent support requests and keep your users happy.

Application Insights Failures

Application Insights Failures

Application Map

Application Map is convenient for seeing the full picture and find flaws in the interaction of servers and / or services in your environment.

Application Insights Application Map

Application Insights Application Map

Log Analytics

Log Analytics created to provide you access to all the data stored in Application Insights. There is a specific query language to retrieve the data you need.

Application Insights Log Analytics

Application Insights Log Analytics

Power BI

You have telemetry collection service, query language to retrieve the data. What is left? Dashboards, many dashboards.

You can export your query from Log Analytics and use in Power BI

Export Log Analytics to Power BI

Export Log Analytics to Power BI

And build a dashboard as you want:

Log Analytics to Power BI

Log Analytics to Power BI

Smart Detection

Even if you have the data and dashboard to view it there is something else. We need a feature to do not spent the time viewing that stuff. And Azure has it - Smart Detection can send you an alert to let you know there is something you need to know.

All you need is set up rules and actions.

List of available Smart Detection rules:

  • Slow page load time
  • Slow server response time
  • Long dependency duration
  • Degradation in server response time
  • Degradation in dependency duration
  • Degradation in trace severity ratio (preview)
  • Abnormal rise in exception volume (preview)
  • Potential memory leak detected (preview)
  • Potential security issue detected (preview)
  • Abnormal rise in daily data volume (preview)

Summary

Application Insights is not only about the cloud. It can improve your on-premise applications and let you know how your applications work and where they need your attention.

If you don't use Azure yet Application Insights is a good point to start building up your hybrid ecosystem.

See Also

What is Application Insights? Kusto Query Language

Vitaly Zhukov

Vitaly Zhukov

Tech Lead, Architect, Developer, Technical Trainer, Microsoft MVP. Over 20 years of experience in system integration and software development. I specialize in designing and implementing scalable, high-performance software solutions across various industries.

You May Also Like

SharePoint New Team Site. Inside Out

SharePoint New Team Site. Inside Out

SharePoint 2019 Preview

SharePoint 2019 Preview

SharePoint Ribbon. Creating multi level menu

SharePoint Ribbon. Creating multi level menu

SharePoint 2013. Geolocation field type

SharePoint 2013. Geolocation field type

Mask "Created By" and "Modified By" user names from forms and views

Mask "Created By" and "Modified By" user names from forms and views

SharePoint list item attachments' size

SharePoint list item attachments' size

SharePoint 2010. Custom forms for ContentType

SharePoint 2010. Custom forms for ContentType

SharePoint 2007. The max/min value of filed in SharePoint list

SharePoint 2007. The max/min value of filed in SharePoint list