Diagnostic logs - Azure Application Gateway (2024)

  • Article

Application Gateway logs provide detailed information for events related to a resource and its operations. These logs are available for events such as Access, Activity, Firewall, and Performance (only for V1). The granular information in logs is helpful when troubleshooting a problem or building an analytics dashboard by consuming this raw data.

Logs are available for all resources of Application Gateway; however, to consume them, you must enable their collection in a storage location of your choice. Logging in Azure Application Gateway is enabled by the Azure Monitor service. We recommend using the Log Analytics workspace as you can readily use its predefined queries and set alerts based on specific log conditions.

Types of Resource logs

You can use different types of logs in Azure to manage and troubleshoot application gateways.

  • Activity log
  • Application Gateway Access Log
  • Application Gateway Performance Log (available only for the v1 SKU)
  • Application Gateway Firewall Log

Note

Logs are available only for resources deployed in the Azure Resource Manager deployment model. You can't use logs for resources in the classic deployment model. For a better understanding of the two models, see the Understanding Resource Manager deployment and classic deployment article.

Examples of optimizing access logs using Workspace Transformations

Example 1: Selective Projection of Columns: Imagine you have application gateway access logs with 20 columns, but you’re interested in analyzing data from only 6 specific columns. By using workspace transformation, you can project these 6 columns into your workspace, effectively excluding the other 14 columns. Even though the original data from those excluded columns won’t be stored, empty placeholders for them still appear in the Logs blade. This approach optimizes storage and ensures that only relevant data is retained for analysis.

Note

Within the Logs blade, selecting the Try New Log Analytics option gives greater control over the columns displayed in your user interface.

Example 2: Focusing on Specific Status Codes: When analyzing access logs, instead of processing all log entries, you can write a query to retrieve only rows with specific HTTP status codes (such as 4xx and 5xx). Since most requests ideally fall under the 2xx and 3xx categories (representing successful responses), focusing on the problematic status codes narrows down the data set. This targeted approach allows you to extract the most relevant and actionable information, making it both beneficial and cost-effective.

Recommended transition strategy to move from Azure diagnostic to resource specific table:

  1. Assess current data retention: Determine the duration for which data is presently retained in the Azure diagnostics table (for example: assume the diagnostics table retains data for 15 days).
  2. Establish resource-specific retention: Implement a new Diagnostic setting with resource specific table.
  3. Parallel data collection: For a temporary period, collect data concurrently in both the Azure Diagnostics and the resource-specific settings.
  4. Confirm data accuracy: Verify that data collection is accurate and consistent in both settings.
  5. Remove Azure diagnostics setting: Remove the Azure Diagnostic setting to prevent duplicate data collection.

Other storage locations:

  • Azure Storage account: Storage accounts are best used for logs when logs are stored for a longer duration and reviewed when needed.
  • Azure Event Hubs: Event hubs are a great option for integrating with other security information and event management (SIEM) tools to get alerts on your resources.
  • Azure Monitor partner integrations.

Learn more about the Azure Monitor's diagnostic settings destinations .

Enable logging through PowerShell

Activity logging is automatically enabled for every Resource Manager resource. You must enable access and performance logging to start collecting the data available through those logs. To enable logging, use the following steps:

  1. Note your storage account's resource ID, where the log data is stored. This value is of the form: /subscriptions/<subscriptionId>/resourceGroups/<resource group name>/providers/Microsoft.Storage/storageAccounts/<storage account name>. You can use any storage account in your subscription. You can use the Azure portal to find this information.

  2. Note your application gateway's resource ID for which logging is enabled. This value is of the form: /subscriptions/<subscriptionId>/resourceGroups/<resource group name>/providers/Microsoft.Network/applicationGateways/<application gateway name>. You can use the portal to find this information.

  3. Enable diagnostic logging by using the following PowerShell cmdlet:

    Set-AzDiagnosticSetting -ResourceId /subscriptions/<subscriptionId>/resourceGroups/<resource group name>/providers/Microsoft.Network/applicationGateways/<application gateway name> -StorageAccountId /subscriptions/<subscriptionId>/resourceGroups/<resource group name>/providers/Microsoft.Storage/storageAccounts/<storage account name> -Enabled $true 

Tip

Activity logs do not require a separate storage account. The use of storage for access and performance logging incurs service charges.

Enable logging through the Azure portal

  1. In the Azure portal, find your resource and select Diagnostic settings.

    For Application Gateway, three logs are available:

    • Access log
    • Performance log
    • Firewall log
  2. To start collecting data, select Turn on diagnostics.

    Diagnostic logs - Azure Application Gateway (3)

  3. The Diagnostics settings page provides the settings for the diagnostic logs. In this example, Log Analytics stores the logs. You can also use event hubs and a storage account to save the diagnostic logs.

    Diagnostic logs - Azure Application Gateway (4)

  4. Type a name for the settings, confirm the settings, and select Save.

To view and analyze activity log data, see Analyze monitoring data.

View and analyze the access, performance, and firewall logs

Azure Monitor logs can collect the counter and event log files from your Blob storage account. For more information, see Analyze monitoring data.

You can also connect to your storage account and retrieve the JSON log entries for access and performance logs. After you download the JSON files, you can convert them to CSV and view them in Excel, Power BI, or any other data-visualization tool.

Tip

If you're familiar with Visual Studio and basic concepts of changing values for constants and variables in C#, you can use the log converter tools available from GitHub.

Next steps

  • Visualize counter and event logs by using Azure Monitor logs.
  • Visualize your Azure activity log with Power BI blog post.
  • View and analyze Azure activity logs in Power BI and more blog post.
Diagnostic logs - Azure Application Gateway (2024)

FAQs

How do you get audit logs for Azure Application Gateway? ›

Enable logging through the Azure portal

In the Azure portal, find your resource and select Diagnostic settings. For Application Gateway, three logs are available: Access log. Performance log.

How to check diagnostic logs in Azure? ›

View logs in Log Analytics
  1. From the Azure portal, locate and select Log Analytics from the left-hand navigation menu.
  2. Locate and select the resource you created when enabling diagnostics.
  3. Under General, locate and select Logs. From this page, you can run queries against your logs.
Aug 28, 2024

How do I enable diagnostic logging for apps in Azure App Service? ›

To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both. The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours.

How do I view application logs in Azure? ›

To access App Service diagnostics, navigate to your App Service app in the Azure portal. In the left navigation, click on Diagnose and solve problems – Checkout the tile for “Diagnostic Tools” and “Availability and Performance” > "Application Logs" title.

How do I check my Azure audit logs? ›

View audit logs in the Azure portal

The Azure portal provides access to the audit log events in your Azure AD B2C tenant. Sign in to the Azure portal. Switch to the directory that contains your Azure AD B2C tenant, and then browse to Azure AD B2C. Under Activities in the left menu, select Audit logs.

How do I pull audit logs? ›

View audit log reports
  1. Click Settings. ...
  2. Click Audit log reports in the Site Collection Administration section.
  3. Select the report that you want, such as Deletion on the View Auditing Reports page, .
  4. Type a URL or Browse to the library where you want to save the report and then click OK.

What is a diagnostic log? ›

Diagnostics logs allow you to export basic usage metrics from your content delivery network endpoint to different kinds sources so that you can consume them in a customized way. You can do the following types of data export: Export data to blob storage, export to CSV, and generate graphs in Excel.

Where can you read Azure diagnostic information from? ›

Tools to view diagnostic data

You can display data from your local storage emulator account and also from storage accounts you created for Azure. For more information, see Browsing and Managing Storage Resources with Server Explorer.

How to run an Azure diagnostics query? ›

To view your diagnostic data, in Log Analytics workspace, open Logs from the left menu. In the query builder, expand LogManagement > AzureDiagnostics. AzureDiagnostics includes Engine and Service events. Notice a query is created on-the-fly.

What is the use of diagnostic settings in Azure? ›

Diagnostic settings in Azure are used to collect resource logs. Resources emit Azure resource Logs and provide rich, frequent data about the operation of that resource.

How to check deployment logs in Azure app Service? ›

You can view details about a resource group deployment through the Azure portal, PowerShell, Azure CLI, or REST API. Select the resource group you want to examine. Select the link under Deployments. Select one of the deployments from the deployment history.

How do I debug an Azure app Service? ›

Debugging Azure App Service
  1. Under Debug, select Attach to Process.
  2. Change Connection type to Microsoft Azure App Services, then select Find...
  3. In the dialog box that opens, select the Subscription name. ...
  4. Filter the view by either Resource Group or Resource Type, or search by name.
Mar 6, 2024

How to view Azure diagnostic logs? ›

Pushing logs from the Azure monitor to Event Hubs

From the home screen of your Azure portal, go to Azure Active Directory. Under Monitoring, click Audit logs. Click Export Data Settings. You can view your current settings under the Diagnostic settings blade.

Where we can see application logs? ›

Click on the Windows Start Button. Right-click on Computer and select Manage. In the Computer Management dialog, expand System Tools | Event Viewer | Windows Logs. Select Application Log.

Where are Azure function app logs? ›

In the path of Storage Account > File Shares (under Data Storage) > Your Function App > LogFiles > Application > Functions > Function > Your Function Name > You can see the console result (Application Logs - Execution results/failed result/error data) of the function.

How do I export Azure audit logs? ›

If you prefer, head manually in the Entra portal, then in Monitoring & Health, then Diagnostic settings.
  1. Click on “Add diagnostic setting”.
  2. Select the types of logs to want to export. ...
  3. Select “Send to Log Analytics workspace”.
  4. Select the Log Analytics Workspace you just created.
  5. Give the diagnostic setting a name.
Jun 21, 2023

How to check logs in Azure WAF? ›

Enable logging through the Azure portal
  1. In the Azure portal, find your resource and select Diagnostic settings. ...
  2. Select Add diagnostic setting.
  3. The Diagnostic setting page provides the settings for the resource logs. ...
  4. Type a name for the settings, confirm the settings, and select Save.
Jun 24, 2024

How do I get Azure deployment logs? ›

You can view details about a resource group deployment through the Azure portal, PowerShell, Azure CLI, or REST API. Select the resource group you want to examine. Select the link under Deployments. Select one of the deployments from the deployment history.

Where to check WAF logs? ›

Use CloudWatch Log Insights to analyze AWS WAF access logs
  • Open the AWS WAF console.
  • In the navigation pane, choose AWS WAF, and then choose Web ACLs.
  • For Region, select the AWS Region that contains your web access control list (web ACL). ...
  • Select your web ACL.
  • In the navigation pane, choose Log Insights.

Top Articles
Using Revolut Abroad - Our Personal Experience
Best Mutual Fund Plans for Lumpsum Investment in India (2024)
Fort Morgan Hometown Takeover Map
Dragon Age Inquisition War Table Operations and Missions Guide
NYT Mini Crossword today: puzzle answers for Tuesday, September 17 | Digital Trends
Hotels
Usborne Links
Soap2Day Autoplay
25X11X10 Atv Tires Tractor Supply
Roblox Developers’ Journal
Back to basics: Understanding the carburetor and fixing it yourself - Hagerty Media
Boat Jumping Female Otezla Commercial Actress
Infinite Campus Parent Portal Hall County
Top Hat Trailer Wiring Diagram
Herbalism Guide Tbc
8 Ways to Make a Friend Feel Special on Valentine's Day
Troy Athens Cheer Weebly
Nhl Tankathon Mock Draft
Tinker Repo
Knock At The Cabin Showtimes Near Alamo Drafthouse Raleigh
Www.craigslist.com Austin Tx
Synergy Grand Rapids Public Schools
Soul Eater Resonance Wavelength Tier List
CVS Health’s MinuteClinic Introduces New Virtual Care Offering
Section 408 Allegiant Stadium
Miller Plonka Obituaries
Ipcam Telegram Group
134 Paige St. Owego Ny
Craigslist Cars And Trucks Mcallen
Kaiser Infozone
Workboy Kennel
Microsoftlicentiespecialist.nl - Microcenter - ICT voor het MKB
Minecraft Jar Google Drive
Moses Lake Rv Show
Tamilyogi Ponniyin Selvan
Devin Mansen Obituary
Family Fare Ad Allendale Mi
Go Upstate Mugshots Gaffney Sc
Arcadia Lesson Plan | Day 4: Crossword Puzzle | GradeSaver
Die Filmstarts-Kritik zu The Boogeyman
Game8 Silver Wolf
Raising Canes Franchise Cost
Winta Zesu Net Worth
Frigidaire Fdsh450Laf Installation Manual
Ghareeb Nawaz Texas Menu
All Weapon Perks and Status Effects - Conan Exiles | Game...
Craigslist Pet Phoenix
Nope 123Movies Full
Marcel Boom X
53 Atms Near Me
Okta Hendrick Login
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5640

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.