© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. Sabale, B. N. IlagMicrosoft Azure Virtual Desktop Guidehttps://doi.org/10.1007/978-1-4842-8063-8_11

11. Monitor and Manage Performance and Health

Arun Sabale1   and Balu N Ilag2
(1)
New Jersey, NJ, USA
(2)
Tracy, CA, USA
 

In this chapter, you will learn how to monitor Azure Virtual Desktop by using the Azure Monitor native tool and see all the different components you can monitor. Additionally, you will see some recommendations for how to use Azure Advisor for Azure Virtual Desktop (AVD).

You can customize Azure Monitor workbooks for Azure Virtual Desktop monitoring and create dashboards with the customized view required for your monitoring team.

Let’s get started with Azure Monitor for Azure Virtual Desktop.

Monitor Azure Virtual Desktop by Using Azure Monitor

Azure Monitor is a full-stack monitoring service that provides a complete set of features to monitor your Azure resources, including Azure Virtual Desktop. You don’t need to directly interact with Azure Monitor, though, to perform a variety of monitoring tasks, because its features are integrated with the Azure portal for the Azure services that it monitors.

When you have critical applications and business processes that rely on Azure resources, it’s important to monitor those resources for their availability, performance, and operation. Azure Virtual Desktop is an application used by multiple end users, so you must monitor and set up alerts for Azure Virtual Desktop.

Some services in Azure display customized monitoring experiences in Azure Monitor. These experiences are called insights , and they include prebuilt workbooks and other specialized features for that service. Azure Virtual Desktop also provides a customized experience with insights, and you can customize them per your requirements.

There are two things you must enable monitoring for.
  • Session host virtual machines

  • Host pool diagnostic logs.

Let’s see why the session host monitor is important and what you can monitor.

Monitoring Virtual Machine Data

Azure virtual machines collect the same kinds of monitoring data as other Azure resources, which are described in the article “Monitoring Data from Azure Resources.” Azure Monitor provides a basic level of monitoring for Azure virtual machines at no cost and with no configuration. Platform metrics for Azure virtual machines include important metrics such as the CPU, network, and disk utilization with no additional configuration. You can onboard machines to VM insights, which deploys required agents and begins collecting data from the guest operating system. Follow these steps to enable insights on each session host:
  1. 1.

    Log in to the Azure portal and go to the session host on which you want to enable insights.

     
  2. 2.

    Click Insights on the left and then the Enable button. See Figure 11-1.

     
Figure 11-1

Azure virtual machine insights

Once you enable the Insights option, then you will be able to see the performance, map, and health of the VM on the Insights page.

On the Performance tab, you can see the disk attached and its usage as well as its CPU usage. See Figure 11-2.
Figure 11-2

Azure virtual machine insights, Performance tab

On the second tab, Map, you can see the process running and the connection to remove the server/host with the port details. You can also see VM properties, log events, alerts, connections, and changes on the right. See Figure 11-3.
Figure 11-3

Azure virtual machine insights, Map tab

Additionally, VM monitoring can be done from the Overview page as well, and you can see all the key metrics on the Monitoring tab. This tab contains the CPU, network, memory, and disk usage for the last 30 days or less. See Figure 11-4.
Figure 11-4

Azure virtual machine insights, Overview

Analyze Logs

Data in the Azure Monitor logs is stored in a Log Analytics workspace, where it’s separated into tables, each with its own set of unique properties.

VM insights store the collected data in logs, and the insights provide performance and map views that you can use to interactively analyze the data. You can work directly with this data to drill down further or perform custom analyses. To analyze other log data that you collect from your virtual machines, use the log queries in Log Analytics. Several built-in queries for virtual machines are available to use, or you can create your own. You can interactively work with the results of these queries, include them in a workbook to make them available to other users, or generate alerts based on their results.

Alerts

Azure Monitor alerts proactively notify you when important conditions/issues are found in your monitoring data. These alerts can help you identify and address issues in your system before your customers notice them or have a big outage. You can set alerts on metrics, logs, and the activity log.

Create Alerts from the Azure Portal

The following procedure describes how to create a metric alert rule in the Azure portal:
  1. 1.

    Log in to the Azure portal, and go to the session host on which you want to create the alert. Alternately, you can create an alert from Azure Monitor that consolidates all your monitoring settings and data in one view.

     
  2. 2.

    Click Alerts, expand the “+ Create menu” item, and select “Alert rule.” See Figure 11-5.

     
Figure 11-5

Azure Monitor, adding an alert

  1. 3.

    On the next page you will add the scope, condition, and actions. See Figure 11-6.

     
Figure 11-6

Azure Monitor, Add Alert page

The alert scope, condition, and action are part of alert creation page, so let’s see what exactly each represent.

What is an alert scope? The scope is the target resource(s) that you want to alert on. You can filter by subscription, by resource type, and by location drop-downs to find the resource you want to monitor. You can also use the search bar to find your resource. If the selected resource has metrics that you can create alert rules on, the available signal types on the bottom right will include metrics. Once you have selected a target resource, click Done. See Figure 11-7.
Figure 11-7

Azure Monitor, Scope option

What is an alert condition? Select the condition on which you want the alert to get triggered. Under the Condition option, you will see a list of signals supported for the resource. Select the metric you want to create an alert on. You will see a chart showing the metric’s behavior for the last six hours. Use the “Chart period” drop-down to see a longer history for the metric. If the metric has dimensions, you will see a dimensions table presented. Optionally, select one or more values per dimension. See Figure 11-8.
Figure 11-8

Azure Monitor, Condition option

  • The displayed dimension values are based on metric data from the previous day.

  • If the dimension value you’re looking for isn’t displayed, click “Add custom value” to add a custom dimension value.

  • You can also choose “Select all current and future values” for any of the dimensions. This will dynamically scale the selection to all current and future values for the dimension.

The metric alert rule will evaluate the condition for all combinations of values selected.

Select the threshold type, operator, and aggregation type. This will determine the logic that the metric alert rule will evaluate.
  • If you are using a Static threshold, continue to define a Threshold value. The metric chart can help determine what might be a reasonable threshold.

  • If you are using a Dynamic threshold, continue to define the Threshold sensitivity. The metric chart will display the calculated thresholds based on recent data.

What are alert actions? You can define what actions and notifications are triggered when the alert rule generates an alert. You can add an action group to the alert rule either by selecting an existing action group or by creating a new action group. Proceed to the Details tab. Under Project details, select the subscription and resource group in which the alert rule resource will be saved. Under “Alert rule details,” specify the severity and alert rule name. You can also provide an alert rule description, select if the alert rule should be enabled when created and if it should automatically resolve alerts (which instructs the alert rule to maintain a state and not fire continuously if there’s already a fired alert on the same condition). See Figure 11-9.
Figure 11-9

Azure Monitor, action groups

  1. 1.

    Once you add the scope, condition, and action, then you can proceed further with the Tags tab, where you can set tags on the alert rule you’re creating.

     
  2. 2.

    Proceed to the “Review + create” tab, where you can review your selections before creating the alert rule. A quick automatic validation will also be performed, notifying you in case any information is missing or needs to be corrected. Once you’re ready to create the alert rule, click Create.

     

Azure Monitor for Azure Virtual Desktop

Azure Monitor for Azure Virtual Desktop is a dashboard built on Azure Monitor Workbooks that helps IT professionals understand their Azure Virtual Desktop environments. This topic will walk you through how to set up Azure Monitor for Azure Virtual Desktop to monitor your Azure Virtual Desktop environments. See Figure 11-10.
Figure 11-10

Azure Virtual Desktop, insights

You can open Azure Monitor for Azure Virtual Desktop with one of the following methods:
  • Go to aka.ms/azmonwvdi.

  • Search for and select Azure Virtual Desktop from the Azure portal; then select Insights.

  • Search for and select Azure Monitor from the Azure portal. Select Insights Hub under Insights; then select Azure Virtual Desktop. Once you have the page open, enter the subscription, resource group, host pool, and time range of the environment you want to monitor.

Log Analytics Settings for AVD

To start using Azure Monitor for Azure Virtual Desktop, you'll need at least one Log Analytics workspace. Use a designated Log Analytics workspace for your Azure Virtual Desktop session hosts to ensure that performance counters and events are only collected from session hosts in your Azure Virtual Desktop deployment. If you already have a workspace set up, skip ahead to “Set Up the Configuration Workbook.”

Set Up the Configuration Workbook

If it’s your first time opening Azure Monitor for Azure Virtual Desktop, you’ll need set up Azure Monitor for your Azure Virtual Desktop environment. To configure your resources, follow these steps:
  1. 1.

    Open Azure Monitor for Azure Virtual Desktop in the Azure portal at aka.ms/azmonwvdi, and select configuration workbook.

     
  2. 2.

    Select an environment to configure under Subscription, Resource Group, and Host Pool.

     
The configuration workbook sets up your monitoring environment and lets you check the configuration after you've finished the setup process. It’s important to check your configuration if items in the dashboard aren’t displaying correctly or when the product group publishes updates that require new settings. See Figure 11-11.
Figure 11-11

Azure Virtual Desktop, Configuration Workbook

Resource Diagnostic Settings

To collect information on your Azure Virtual Desktop infrastructure, you’ll need to enable several diagnostic settings on your Azure Virtual Desktop host pools and workspaces (this is your Azure Virtual Desktop workspace, not your Log Analytics workspace).

To set your resource diagnostic settings in the configuration workbook, follow these steps:
  1. 1.

    Select the “Resource diagnostic settings” tab in the configuration workbook.

     
  2. 2.

    Select the Log Analytics workspace to send Azure Virtual Desktop diagnostics.

     

Host Pool Diagnostic Settings

To set up host pool diagnostics using the “resource diagnostic settings” section in the configuration workbook, follow these steps:
  1. 1.
    Under “Host pool,” check to see whether Azure Virtual Desktop diagnostics are enabled. If they aren’t, an error message will appear that says, “No existing diagnostic configuration was found for the selected host pool.” You’ll need to enable the following supported diagnostic tables:
    • Checkpoint

    • Error

    • Management

    • Connection

    • HostRegistration

    • AgentHealthStatus

     
  2. 2.
    Select “Configure host pool.” See Figure 11-12.
    Figure 11-12

    Azure Virtual Desktop, hostpool diagnostic setting

     
  3. 3.

    Select Deploy.

     
  4. 4.
    Refresh the configuration workbook. See Figure 11-13.
    Figure 11-13

    Azure Virtual Desktop, hostpool diagnostic setting deployment

     

Workspace Diagnostic Settings

To set up workspace diagnostics using the “resource diagnostic settings” section in the configuration workbook, follow these steps:
  1. 1.
    Under Workspace, check to see whether Azure Virtual Desktop diagnostics are enabled for the Azure Virtual Desktop workspace. If they aren’t, an error message will appear that says “No existing diagnostic configuration was found for the selected workspace.” You’ll need to enable the following supported diagnostics tables:
    • Checkpoint

    • Error

    • Management

    • Feed

     
  2. 2.

    Select “Configure workspace.”

     
  3. 3.

    Select Deploy.

     
  4. 4.

    Refresh the configuration workbook. See Figure 11-14.

     
Figure 11-14

Azure Virtual Desktop, workspace diagnostic setting

Session Host Data Settings

To collect information on your Azure Virtual Desktop session hosts, you’ll need to install the Log Analytics agent on all session hosts in the host pool, make sure the session hosts are sending to a Log Analytics workspace, and configure your Log Analytics agent settings to collect performance data and Windows Event Logs.

The Log Analytics workspace you send session host data to doesn’t have to be the same one you send diagnostic data to. If you have Azure session hosts outside of your Azure Virtual Desktop environment, we recommend having a designated Log Analytics workspace for the Azure Virtual Desktop session hosts.

To set the Log Analytics workspace where you want to collect session host data, follow these steps:
  1. 1.

    Select the session host data settings tab in the configuration workbook.

     
  2. 2.

    Select the Log Analytics workspace you want to send session host data to.

     

Session Hosts

You’ll need to install the Log Analytics agent on all session hosts in the host pool and send data from those hosts to your selected Log Analytics workspace. If Log Analytics isn’t configured for all the session hosts in the host pool, you’ll see a “Session hosts” section at the top of the session host data settings with the message “Some hosts in the host pool are not sending data to the selected Log Analytics workspace.”

To set up your remaining session hosts using the configuration workbook, follow these steps:
  1. 1.

    Select “Add hosts to workspace.”

     
  2. 2.

    Refresh the configuration workbook.

     

Optional: Configure Alerts

Azure Monitor for Azure Virtual Desktop allows you to monitor Azure Monitor alerts happening within your selected subscription, in the context of your Azure Virtual Desktop data. Azure Monitor alerts are an optional feature of your Azure subscriptions, and you need to set them up separately from Azure Monitor for Azure Virtual Desktop. You can use the Azure Monitor alerts framework to set custom alerts on Azure Virtual Desktop events, diagnostics, and resources.

Monitor Azure Virtual Desktop by Using Azure Advisor

Here’s how to use Azure Advisor.

Use Azure Advisor with Azure Virtual Desktop

Azure Advisor can help users resolve common issues on their own, without having to file support cases. The recommendations reduce the need to submit help requests, saving you time and costs.

Let’s see how to set up Azure Advisor in your Azure Virtual Desktop deployment to help your users.

What Is Azure Advisor?

Azure Advisor analyzes your configurations and telemetry to offer personalized recommendations to solve common problems. With these recommendations, you can optimize your Azure resources for reliability, security, operational excellence, performance, and cost.

How to Start Using Azure Advisor

First, open the Azure portal at https://portal.azure.com/, and then select Advisor under Azure Services, as shown in Figure 11-15. You can also enter Azure Advisor into the search bar in the Azure portal.
Figure 11-15

Azure Virtual Desktop, Advisor

When you open Azure Advisor, you'll see five categories (see Figure 11-16).
  • Cost

  • Security

  • Reliability

  • Operational Excellence

  • Performance

Figure 11-16

Azure Virtual Desktop, Advisor overview

When you select a category, you’ll go to its active recommendations page. On this page, you can view which recommendations Azure Advisor has for you, as shown in Figure 11-17.
Figure 11-17

Azure Virtual Desktop, Advisor recommendation

Additional Tips for Azure Advisor

Here are some additional tips:
  • Make sure to check your recommendations frequently, at least more than once a week. Azure Advisor updates its active recommendations multiple times per day. Checking for new recommendations can prevent larger issues by helping you spot and solve smaller ones.

  • Always try to solve the issues with the highest priority level in Azure Advisor. High-priority issues are marked with red. Leaving high-priority recommendations unresolved can lead to problems down the line.

  • If a recommendation seems less important, you can dismiss it or postpone it. To dismiss or postpone a recommendation, go to the Action column, and change the item’s state.

  • Don’t dismiss recommendations until you know why they’re appearing and are sure it won’t have a negative impact on you or your users. Always select “Learn more” to see what the issue is. If you resolve an issue by following the instructions in Azure Advisor, it will automatically disappear from the list. You’re better off resolving issues than postponing them repeatedly.

  • Whenever you come across an issue in Azure Virtual Desktop, always check Azure Advisor first. Azure Advisor will give you directions for how to solve the problem, or at least point you toward a resource that can help.

Summary

In this chapter, you learned about monitoring Azure Virtual Desktop resources such as the session host, host pool, and workspace. You also learned about setting up alerts for different resources with different conditions.

You checked how to use Azure Advisor and how it can help you to improve your AVD environment by providing recommendations.

Now you know everything about Azure Virtual Desktop, so you are good to design and set up the AVD environment and optimize it based on your requirements. If you are preparing for AZ-140, then good luck for the exam, and if you want to implement the AVD service in production, then I recommend you set up a lab to test Azure Virtual Desktop and verify all the options. Microsoft always keeps updating the cloud services, so check the recent changes in the service and test them before you implement them in production.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.200.226