Web Apps

Azure 70-533: Monitoring Web Apps Resources

When an organization runs web apps, those consume resources and incur costs, and several errors can be generated. Sometimes, a user might request web pages that do not exist, and an error might display. 

Performance issues in your cloud app can impact your business. With multiple interconnected components and frequent releases, degradations can happen at any time. And if you’re developing an app, your users usually discover issues that you didn’t find in testing. You should know about these issues immediately, and have tools for diagnosing and fixing the problems.

In this article, we are going to explain about the topic that addresses the “Configure diagnostics, monitoring, and analytics” knowledge measured as highlighted in the Microsoft Azure Infrastructure exam guide.

AZ-100 Online Course

Eligible candidates for this exam have:

  • Who is experienced in implementing an infrastructure solution in Microsoft Azure
  • Candidates have experience implementing and monitoring cloud and hybrid solutions
  • Supporting application lifecycle management

The Azure certification exam 70-533 includes such topics as Designing and implementing Azure App Service apps; creating and managing Azure Resource Manager Virtual Machines; designing and implementing a storage strategy; implementing an Azure Active Directory; implementing virtual networks; and designing and deploying ARM templates. Be sure to have hands-on experience!

 Section  Knowledge Measured
Design and implement Azure App Service apps (15–20%) 
  • Deploy Web Apps
  • Configure Web Apps
  • Configure diagnostics, monitoring, and analytics
  • Configure Web Apps for scale and resilience
Create and manage Azure Resource Manager Virtual Machines (20–25%) 
  • Deploy workloads on Azure Resource Manager (ARM) virtual machines (VMs)
  • Perform configuration management
  • Design and implement VM storage
  • Monitor ARM VMs
  • Monitor ARM VM availability
  • Scale ARM VMs
Design and implement a storage strategy (20–25%) 
  • Implement Azure storage blobs and Azure files
  • Manage access
  • Configure diagnostics, monitoring, and analytics
  • Implement Azure SQL Databases
  • Implement recovery services
Implement an Azure Active Directory (15–20%) 
  • Integrate an Azure Active Directory (Azure AD) with existing directories
  • Configure Application Access
  • Integrate an app with Azure AD
  • Implement Azure AD B2C and Azure B2B
Implement virtual networks (10–15%) 
  • Configure virtual networks
  • Modify network configuration
  • Design and implement a multi-site or hybrid network
Design and deploy ARM templates (10–15%) 
  • Implement ARM templates
  • Control access
  • Design role-based access control (RBAC)

 Table #1  Domains covered by the 70-533 Azure Infrastructure Solutions Exam

Microsoft Azure has a range of tools for identifying these problems, allows you to have full control of your Web App’s behavior by providing several diagnostic logs and tools. You need to know how to configure logging for your web app, and how to view and analyze the logging data.

You should monitor your Web Apps for profiling its performance. If you want to troubleshoot a web app’s errors or improve its performance, you need to gather information about the behavior of the web app.

Microsoft Azure AZ 100 Online Course

Enabling Diagnostics Logs

Azure provides built-in diagnostics to assist with debugging an App Service web app.

App Service web apps provide diagnostic functionality for logging information from both the web server and the web application. These are logically separated into web server diagnostics and application diagnostics.

 Type   Log Class  Description
Web server diagnostics Detailed Error Logging Detailed error information for HTTP status codes that indicate a failure (status code 400 or greater).This may contain information that can help determine why the server returned the error code.
  Failed Request Tracing Detailed information on failed requests, including a trace of the IIS components used to process the request and the time taken in each component.
This can be useful if you are attempting to increase site performance or isolate what is causing a specific HTTP error to be returned
 
  Web Server Logging Information about HTTP transactions using the W3C extended log file format.
This is useful when determining overall site metrics.
 
Application diagnostics Application log Application diagnostics allows you to capture information produced by a web application.ASP.NET applications can use the System.Diagnostics.Trace class to log information to the application diagnostics log. This is useful retrieve these logs to help with troubleshooting at runtime. 

 Table #1. Logging types

App Service web apps also log deployment information when you publish content to a Web App. It happens automatically and there are no configuration settings for deployment logging.

Deployment logging allows you to determine why a deployment failed and determine why the script or program is failing.

To enable diagnostics in the Azure Portal, go to the blade for your web app and click Settings > Diagnostics logs. Diagnostics can also be enabled from Azure PowerShell using the Set-AzureWebsite cmdlet.

Enabling Diagnostic Logs
Enabling Diagnostic Logs

When you enable application diagnostics you also choose the Level. This setting allows you to filter the information captured to informational, warning or error information. Setting this to verbose will log all information produced by the application.

You can store diagnostic logs in a file system, a table storage, or a blob storage.

Any combination of the file system, table storage, or blob storage can be enabled at the same time, and have individual log level configurations. For example, you may wish to log errors and warnings to blob storage as a long-term logging solution, while enabling file system logging with a level of verbose.

Accessing Diagnostics Logs

To access diagnostics logs you can use: An FTP client, a command in the Windows PowerShell or use the Azure command-line tools.

The logs are in the following folders:

  • Application logs: /LogFiles/Application
  • Detailed error logs: /LogFiles/DetailedErrors
  • Failed request traces: /LogFiles/W3SVC#########/
  • Web Server logs: /LogFiles/http/RawLogs
  • Deployment logs: /LogFiles/Git

To download the log files, you can use the Save-AzureWebSiteLog cmdlet into the Azure PowerShell. You also can use the Azure cross-platform command-line interface (X-Plat-CLI) to download logs: Azure site log download MyWebappname

[divider /]

View Logs in Application Insights

If you want better filtering and search capabilities, you can view the application logs in Visual Studio, which integrates with Application Insights. To take advantage of this functionality, install the Application Insight SDK and then add it to your project in Visual Studio.

Visual Studio Application Insights provides tools for filtering and searching logs, and for correlating the logs with requests and other events.

[divider /]

Azure Infrastructure Certification Books

[divider /]

Monitoring your Web Apps

There is a range of tools for monitoring Azure applications and services. Some of their features overlap.

 Tool  Brief Description
Azure Monitor It is a basic tool for monitoring services running on Azure. It gives you infrastructure-level data about the throughput of a service and the surrounding environment. If you are managing your apps all in Azure, deciding whether to scale up or down resources, then Azure Monitor gives you what you use to start 
Application Insights It can be used for development and as a production monitoring solution. It works by installing a package into your app, and so gives you a more internal view of what’s going on. Its data includes response times of dependencies, exception traces, debugging snapshots, execution profiles. It provides powerful smart tools for analyzing all this telemetry both to help you debug an app and to help you understand what users are doing with it.  
Log Analytics It is for those who need to tune performance and plan maintenance on applications running in production. It collects and aggregates data from many sources, though with a delay of 10 to 15 minutes. It provides a holistic IT management solution for Azure, on-premises, and third-party cloud-based infrastructure (such as Amazon Web Services). It provides richer tools to analyze data across more sources, allows complex queries across all logs, and can proactively alert on specified conditions. You can even collect custom data into its central repository so can query and visualize it. 
System Center Operations Manager (SCOM) It is for managing and monitoring large cloud installations. It can integrate with and manage Azure apps. Among other things, it can install Application Insights on existing live apps. 

  Table #3 Monitoring Tools

 The Azure portal also includes a Monitoring section for every web app. You can use this to view performance counters that describe how your web app uses resources such as CPU time and network traffic. Some of the most interesting counters include:

  • CPU Time
  • Data In
  • Data Out
  • HTTP Server Errors
  • Requests
  • Memory working set
Monitoring Web Apps
Monitoring: Adding an Alert Rule

By adding these counters and displaying them in the graph, you can examine how the demand and the web app response have varied over an hour, 24 hours, or seven days.

You also can set alerts that can trigger an email when a counter exceeds a threshold.

[divider /]

Important Points to Remember 

  • Azure provides built-in diagnostics to assist with debugging an App Service web app
  • The logging information is classified as web server diagnostics and application diagnostics
  • You can enable Detailed Error Logging, Failed Request Tracing, and Web Server Logging to Web server diagnostics
  • Application diagnostics allows you to capture information produced by a web application
  • You can store diagnostic logs in a file system, a table storage, or a blob storage
  • To access diagnostics logs you can use: FTP, Windows PowerShell or Azure command-line tools
  • To download the log files, you can use the Save-AzureWebSiteLog cmdlet into the Azure PowerShell
  • Visual Studio Application Insights provides tools for filtering and searching logs
  • You also can set alerts that can trigger an email when a counter exceeds a threshold.

[divider /]

Are you preparing for Microsoft Azure Exam 70-533 Certification: Implementing Microsoft Azure Infrastructure Solutions? Pass in first attempt with Whizlabs Free and Practice Tests.

About Pavan Gumaste

Pavan Rao is a programmer / Developer by Profession and Cloud Computing Professional by choice with in-depth knowledge in AWS, Azure, Google Cloud Platform. He helps the organisation figure out what to build, ensure successful delivery, and incorporate user learning to improve the strategy and product further.

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top