Skip to main content

Azure Web Apps

thumbnail icon

The Azure Web Apps app allows you to collect Azure web server and application diagnostics logs and monitor the health of your Azure Web Apps environment. This app provides preconfigured dashboards that allow you to monitor server operation, traffic requests, and response times.

For more information, see Azure Web Apps.

Log and metric types​

For Azure Web Apps, you can collect the following logs and metrics:

  • Azure WebApps platform metrics. These are metrics specific to Functions like execution count and execution units. For more information on supported metrics, refer to Azure documentation.

Sample log messages​

2017-09-25 23:27:36 eShopCart GET / X-ARR-LOG-ID=9b3056e8-21d5-43f7-8fd7-4aec6b29525e
80 - 60.4.192.44 Mozilla/5.0+(Macintosh+NT+6.3;+WOW64)+AppleWebKit/537.36+(KHTML,
+like+Gecko)+Chrome/60.4.192.44+Safari/537.36 PHPSESSID=tv2iv6tn8c9su542l464ibaro5;
+ARRAffinity=d6c6606b1a249bd37139b09d6c2cb4dd61f6b5cd607f934012aca86bd59515444 -
eShopCart.azurewebsites.net 200 0 0 3098 1008 1000

Sample queries​

Traffic over time outlier
_sourceCategory=Azure/Web-app
| parse regex "\d+-\d+-\d+ \d+:\d+:\d+ (?<s_sitename>\S+) (?<cs_method>\S+) (?<cs_uri_stem>\S+) (?<cs_uri_query>\S+) (?<src_port>\S+) (?<src_user>\S+) (?<client_ip>\S+) (?<cs_user_agent>\S+) (?<cs_cookie>\S+) (?<cs_referrer>\S+) (?<cs_host>\S+) (?<sc_status>\S+) (?<sc_substatus>\S+) (?<sc_win32_status>\S+) (?<sc_bytes>\S+) (?<cs_bytes>\S+) (?<time_taken>\S+)"
| timeslice 5m
| count by _timeslice
| outlier _count

Setup​

Azure service sends monitoring data to Azure Monitor, which can then stream data to Eventhub. Sumo Logic supports:

You must explicitly enable diagnostic settings for each web app that you want to monitor. You can forward logs to the same event hub provided they satisfy the limitations and permissions as described here.

When you configure the event hubs source or HTTP source, plan your source category to ease the querying process. A hierarchical approach allows you to make use of wildcards. For example: Azure/WebApps/Logs, Azure/WebApps/Metrics.

Configure field in field schema​

  1. Classic UI. In the main Sumo Logic menu, select Manage Data > Logs > Fields.
    New UI. In the top menu select Configuration, and then under Logs select Fields. You can also click the Go To... menu at the top of the screen and select Fields.
  2. Search for following fields:
    • tenant_name. This field is tagged at the collector level and you can get the tenant name using the instructions here.
    • location. The region to which the resource name belongs to.
    • subscription_id. ID associated with a subscription where resource is present.
    • resource_group. The resource group name where the Azure resource is present.
    • provider_name. Azure resource provider name (for example, Microsoft.WEB).
    • resource_type. Azure resource type (for example, SITES).
    • resource_name. The name of the resource (for example, Azure Function App name).
  3. Create the fields if they are not present. Refer to Manage fields.

Configure Field Extraction Rules​

Create a Field Extraction Rule (FER) by following the instructions here. If the FER already exists with same name, then skip this step.

Azure Location Extraction FER​

Rule Name: AzureLocationExtractionFER
Applied at: Ingest Time
Scope (Specific Data): tenant_name=*
Parse Expression
json "location", "properties.resourceLocation", "properties.region" as location, resourceLocation, service_region nodrop
| replace(toLowerCase(resourceLocation), " ", "") as resourceLocation
| if (!isBlank(resourceLocation), resourceLocation, location) as location
| if (!isBlank(service_region), service_region, location) as location
| if (isBlank(location), "global", location) as location
| fields location

Resource ID Extraction FER​

Rule Name: AzureResourceIdExtractionFER
Applied at: Ingest Time
Scope (Specific Data): tenant_name=*
Parse Expression
json "resourceId", "ResourceId" as resourceId1, resourceId2 nodrop
| if (isBlank(resourceId1), resourceId2, resourceId1) as resourceId
| toUpperCase(resourceId) as resourceId
| parse regex field=resourceId "/SUBSCRIPTIONS/(?<subscription_id>[^/]+)" nodrop
| parse field=resourceId "/RESOURCEGROUPS/*/" as resource_group nodrop
| parse regex field=resourceId "/PROVIDERS/(?<provider_name>[^/]+)" nodrop
| parse regex field=resourceId "/PROVIDERS/[^/]+(?:/LOCATIONS/[^/]+)?/(?<resource_type>[^/]+)/(?<resource_name>.+)" nodrop
| parse regex field=resource_name "(?<parent_resource_name>[^/]+)(?:/PROVIDERS/[^/]+)?/(?<service_type>[^/]+)/?(?<service_name>.+)" nodrop
| if (isBlank(parent_resource_name), resource_name, parent_resource_name) as resource_name
| fields subscription_id, location, provider_name, resource_group, resource_type, resource_name, service_type, service_name

Configure metric rules​

Azure Observability Metadata Extraction Service Level​

If this rule already exists, there's no need to create it again.

Rule Name: AzureObservabilityMetadataExtractionAppServiceLevel
Metric match expression
resourceId=/SUBSCRIPTIONS/*/RESOURCEGROUPS/*/PROVIDERS/*/SITES/* tenant_name=*
Fields extractedMetric rule
subscription_id$resourceId._1
resource_group$resourceId._2
provider_name$resourceId._3
resource_typeSITES
resource_name$resourceId._4

Configure metrics collection​

In this section, you will configure a pipeline for shipping metrics from Azure Monitor to an Event Hub, on to an Azure Function, and finally to an HTTP Source on a hosted collector in Sumo Logic.

  1. Configure an HTTP Source.
  2. Configure and deploy the ARM Template.
  3. Export metrics to Event Hub. Perform below steps for each Azure WebApps that you want to monitor.
    1. Choose Stream to an event hub as destination.
    2. Select AllMetrics.
    3. Use the Event Hub namespace created by the ARM template in Step 2 above. You can create a new Event Hub or use the one created by ARM template. You can use the default policy RootManageSharedAccessKey as the policy name.
      Azure WebApps metrics

Configure logs collection​

Diagnostic logs​

In this section, you will configure a pipeline for shipping diagnostic logs from Azure Monitor to an Event Hub.

  1. To set up the Azure Event Hubs source in Sumo Logic, refer to the Azure Event Hubs Source for Logs.
  2. To create the Diagnostic setting in the Azure portal, refer to the Azure documentation. Perform the below steps for each Azure WebApps that you want to monitor.
    1. Choose Stream to an event hub as the destination.
    2. Select HTTP logs, App Service Console Logs, App Service Application Logs, Access Audit Logs, IPSecurity Audit logs, App Service Platform logs, Report Antivirus Audit Logs, Site Content Change Audit Logs.
    3. Use the Event Hub namespace and Event Hub name configured in previous step in destination details section. You can use the default policy RootManageSharedAccessKey as the policy name.
  3. Tag the location field in the source with right location value.
    Azure WebApps Tag Location
    Azure WebApps logs

Activity logs (optional)​

To collect activity logs, follow the instructions here. If you are already collecting activity logs for a subscription, do not perform this step.

note

Since this source contains logs from multiple regions, make sure that you do not tag this source with the location tag.

Enabling Microsoft Defender for Cloud​

For Security events, make sure you enable Microsoft Defender for Cloud. In Defender Plans Settings page toggle the App Service status under Cloud Workload Protection section.

Edit Settings Cloud Defender Plans
Enabling health check metric​

For getting health check metric, make sure you enable Health check under the Monitoring dropdown.

Enable Health Check Metric

Installing the Azure Web Apps app​

This section provides instructions on how to install the Azure Web Apps app, and shows examples of each of the preconfigured dashboards you can use to analyze your data.

To install the app, do the following:

  1. Select App Catalog.
  2. In the 🔎 Search Apps field, run a search for your desired app, then select it.
  3. Click Install App.
    note

    Sometimes this button says Add Integration.

  4. Click Next in the Setup Data section.
  5. In the Configure section of your respective app, complete the following fields.
    1. Key. Select either of these options for the data source.
      • Choose Source Category and select a source category from the list for Default Value.
      • Choose Custom, and enter a custom metadata field. Insert its value in Default Value.
  6. Click Next. You will be redirected to the Preview & Done section.

Post-installation

Once your app is installed, it will appear in your Installed Apps folder, and dashboard panels will start to fill automatically.

Each panel slowly fills with data matching the time range query and received since the panel was created. Results will not immediately be available, but will update with full graphs and charts over time.

Viewing Azure Web Apps dashboards​

All dashboards have a set of filters that you can apply to the entire dashboard. Use these filters to drill down and examine the data to a granular level.

  • You can change the time range for a dashboard or panel by selecting a predefined interval from a drop-down list, choosing a recently used time range, or specifying custom dates and times. Learn more.
  • You can use template variables to drill down and examine the data on a granular level. For more information, see Filtering Dashboards with Template Variables.
  • Most Next-Gen apps allow you to provide the scope at the installation time and are comprised of a key (_sourceCategory by default) and a default value for this key. Based on your input, the app dashboards will be parameterized with a dashboard variable, allowing you to change the dataset queried by all panels. This eliminates the need to create multiple copies of the same dashboard with different queries.

Overview​

The Azure WebApps - Overview dashboard provides comprehensive information of all the service health incidents or resource health events associated with Azure WebApps in your azure account.

Use this dashboard to:

  • View recent resource and service health incidents.
  • View distribution of service and resource health by incident type.
Azure WebApps Overview dashboard

Antivirus Scan Audit​

The Azure WebApps - Antivirus Scan Audit dashboard provides detailed insights into the antivirus scan results and audit logs associated with your Azure WebApps.

Use this dashboard to:

  • View recent antivirus scan results and their statuses.
  • Analyze audit logs for compliance and security checks.
Azure WebApps health dashboard

Content and Client Platform​

The Azure WebApps - Content and Client Platform dashboard offers an overview of the content delivery performance and client platform statistics for your Azure WebApps.

Use this dashboard to:

  • Monitor content delivery metrics and client platform usage.
  • Identify trends in client platform access and performance.
Azure WebApps health dashboard

IP Restrictions​

The Azure WebApps - IP Restrictions dashboard provides insights into the IP address restrictions configured for your Azure WebApps.

Use this dashboard to:

  • View configured IP restrictions and their statuses.
  • Monitor access attempts based on IP restrictions.
Azure WebApps health dashboard

Memory​

The Azure WebApps - Memory dashboard tracks memory usage and performance metrics for your Azure WebApps.

Use this dashboard to:

  • Monitor real-time memory utilization and trends.
  • Identify memory-related performance issues and bottlenecks.
Azure WebApps health dashboard

Network​

The Azure WebApps - Network dashboard offers comprehensive insights into the network performance and traffic for your Azure WebApps.

Use this dashboard to:

  • Analyze network traffic patterns and performance metrics.
  • Identify potential network issues affecting your applications.
Azure WebApps health dashboard

I/O Operations​

The Azure WebApps - I/O Operations dashboard provides a comprehensive view of the I/O operational metrics and activities associated with your Azure WebApps.

Use this dashboard to:

  • Monitor I/O operational events and their impact on service availability.
  • Analyze trends in operational performance over time.
Azure WebApps health dashboard

OS Statistics​

The Azure WebApps - OS Statistics dashboard presents an overview of operating system metrics related to your Azure WebApps.

Use this dashboard to:

  • Monitor key OS performance indicators and health metrics.
  • Identify potential issues at the operating system level.
Azure WebApps health dashboard

Platform​

The Azure WebApps - Platform dashboard provides insights into the underlying platform performance and configurations of your Azure WebApps.

Use this dashboard to:

  • Monitor platform health metrics and configurations.
  • Identify trends and issues related to platform performance.
Azure WebApps health dashboard

Errors​

The Azure WebApps - Errors dashboard details the error rates and response codes generated by your Azure WebApps.

Use this dashboard to:

  • Analyze error trends and response code distribution.
  • Identify common issues affecting application performance.
Azure WebApps health dashboard

Server Operations​

The Azure WebApps - Server Operations dashboard tracks request and response times for your Azure WebApps.

Use this dashboard to:

  • Monitor performance metrics related to request and response times.
  • Identify latency issues and optimize response performance.
Azure WebApps health dashboard

Traffic Insights​

The Azure WebApps - Traffic Insights dashboard provides a comprehensive view of traffic patterns for your Azure WebApps.

Use this dashboard to:

  • Analyze traffic metrics for different applications and requests.
  • Identify usage trends and optimize application performance.
Azure WebApps health dashboard

Health​

The Azure WebApps - Health dashboard provides information of any service health incidents or resource health events associated with Azure WebApps in your azure account.

Use this dashboard to:

  • View recent resource and service health incidents.
  • View distribution of service and resource health by incident type.
Azure WebApps health dashboard

Policy and Recommendations​

The Azure WebApps - Policy and Recommendations dashboard provides information of all effect action operations performed by Azure policy and recommendations events from Azure Advisor.

Use this dashboard to:

  • Monitor policy events with warnings and errors.
  • View recent failed policy events.
  • View total recommendation events.
  • Identify High Impact recommendations.
  • View recent recommendation events and navigate to the affected resource.
Azure WebApps - Policy and Recommendations dashboard

Administrative Operations​

The Azure SQL - Administrative Operations dashboard provides details on read/write/delete specific changes, different operations used, top 10 operations that caused most errors, and users performing admin operations.

Use this dashboard to:

  • Identify top users performing administrative operations.
  • View Top 10 operations that caused the most errors.
  • View recent read, write, and delete operations.
Azure WebApps Administrative Operations dashboard

Upgrading the Azure Web Apps app (Optional)​

To update the app, do the following:

  1. Select App Catalog.
  2. In the Search Apps field, search for and then select your app.
    Optionally, you can identify apps that can be upgraded in the Upgrade available section.
  3. To upgrade the app, click Upgrade.
    1. If the upgrade does not have any configuration or property changes, you will be redirected to the Preview & Done section.
    2. If the upgrade has any configuration or property changes, you will be redirected to Setup Data page.
      1. In the Configure section of your respective app, complete the following fields.
        • Key. Select either of these options for the data source.
          • Choose Source Category and select a source category from the list for Default Value.
          • Choose Custom and enter a custom metadata field. Insert its value in Default Value.
      2. Click Next. You will be redirected to the Preview & Done section.

Post-update

Your upgraded app will be installed in the Installed Apps folder, and dashboard panels will start to fill automatically.

note

See our Release Notes changelog for new updates in the app.

Uninstalling the Azure Web Apps app (Optional)​

To uninstall the app, do the following:

  1. Select App Catalog.
  2. In the 🔎 Search Apps field, run a search for your desired app, then select it.
  3. Click Uninstall.
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.