Monitor Applications Via Application Insights Using Log Alerts

Introduction

In this article, I want to showcase how one can get an email notification as an alert when "Something went wrong" using Log Analytics query to evaluate resources and Logs every set frequency (fire an alert based on the results). This article covers the basic features of Application Insight Log Alert. 

Alerts in Microsoft Azure

Alerts proactively notify you when issues found with your infrastructure or application using your monitoring data in Azure Monitor. They allow you to identify and address issues before the users of your system notice them.

Migrating Spring Java Applications to Azure App Service (Part 2 – Logging and Monitoring)

As we demonstrated in Part 1 of the series, running on the cloud is not only for cool new applications following twelve-factor principles and coded to be cloud-native. In the first article, we demonstrated how to migrate a legacy Java Spring application to run on Azure App Service and how to address handling JNDI, credentials, and externalizing the configuration. In this article, we will show to enable logging, and monitoring to use Azure native capabilities. The full application example is available on Github.

Application Insights

Application Insights is an extensible Application Performance Management (APM) service helping to monitor web applications. It will automatically detect dependencies such as HTPP or JDBC calls and includes powerful analytics tools to help you diagnose performance issues. For more details, refer to Microsoft's Getting Started Guide.