This commit is contained in:
polichtm 2020-07-03 14:53:54 -04:00 committed by GitHub
parent 2871edcc06
commit 1167de4c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,15 +84,14 @@ In this task, you will create and configure an Azure Log Analytics workspace and
1. In the Azure portal, search for and select **Log Analytics workspaces** and, on the **Log Analytics workspaces** blade, click **+ Add**.
1. On the **Log Analytics workspace** blade, ensure that the **Create New** option is selected, specify the following settings, and click **OK**:
1. On the **Basics** tab of the **Create Log Analytics workspace** blade, the following settings, click **Review + Create** and then click **Create**:
| Settings | Value |
| --- | --- |
| Log Analytics Workspace | any unique name |
| Subscription | the name of the Azure subscription you are using in this lab |
| Resource group | the name of a new resource group **az104-11-rg1** |
| Location | the name of the Azure region into which you deployed the virtual machine in the previous task |
| Pricing tier | **Pay-as-you-go** |
| Log Analytics Workspace | any unique name |
| Region | the name of the Azure region into which you deployed the virtual machine in the previous task |
>**Note**: Make sure that you specify the same region into which you deployed virtual machines in the previous task.
@ -136,15 +135,15 @@ In this task, you will review default monitoring settings of Azure virtual machi
1. On the **az104-11-vm0** blade, in the **Monitoring** section, click **Metrics**.
1. On the **az104-11-vm0 - Metrics** blade, on the default chart, note that the only available **METRICS NAMESPACE** is **Virtual Machine Host**.
1. On the **az104-11-vm0 | Metrics** blade, on the default chart, note that the only available **Metrics Namespace** is **Virtual Machine Host**.
>**Note**: This is expected, since no guest-level diagnostic settings have been configured yet.
1. In the **METRICS** drop-down list, review the list of available metrics.
1. In the **Metric** drop-down list, review the list of available metrics.
>**Note**: The list includes a range of CPU, disk, and network-related metrics that can be collected from the virtual machine host, without having access into guest-level metrics.
1. In the **METRICS** drop-down list, select **Percentage CPU**, in the **AGGREGATION** drop-down list, select **Avg**, and review the resulting chart.
1. In the **Metric** drop-down list, select **Percentage CPU**, in the **Aggregation** drop-down list, select **Avg**, and review the resulting chart.
#### Task 5: Configure Azure virtual machine diagnostic settings
@ -152,15 +151,15 @@ In this task, you will configure Azure virtual machine diagnostic settings.
1. On the **az104-11-vm0** blade, in the **Monitoring** section, click **Diagnostic settings**.
1. On the **Overview** tab of the **az104-11-vm0 - Diagnostic settings** blade, click **Enable guest-level monitoring**.
1. On the **Overview** tab of the **az104-11-vm0 | Diagnostic settings** blade, click **Enable guest-level monitoring**.
>**Note**: Wait for the operation to take effect. This might take about 3 minutes.
1. Switch to the **Performance counters** tab of the **az104-11-vm0 - Diagnostic settings** blade and review the available counters.
1. Switch to the **Performance counters** tab of the **az104-11-vm0 | Diagnostic settings** blade and review the available counters.
>**Note**: By default, CPU, memory, disk, and network counters are enabled. You can switch to the **Custom** view for more detailed listing.
1. Switch to the **Logs** tab of the **az104-11-vm0 - Diagnostic settings** blade and review the available event log collection options.
1. Switch to the **Logs** tab of the **az104-11-vm0 | Diagnostic settings** blade and review the available event log collection options.
>**Note**: By default, log collection includes critical, error, and warning entries from the Application Log and System log, as well as Audit failure entries from the Security log. Here as well you can switch to the **Custom** view for more detailed configuration settings.
@ -170,23 +169,21 @@ In this task, you will configure Azure virtual machine diagnostic settings.
>**Note**: Do not wait for the operation to complete but instead proceed to the next step. The operation might take about 5 minutes.
1. On the **az104-11-vm0 - Logs** blade, in the **Monitoring** section, click **Metrics**.
1. On the **az104-11-vm0 | Logs** blade, in the **Monitoring** section, click **Metrics**.
1. On the **az104-11-vm0 - Metrics** blade, on the default chart, note that at this point, the **METRICS NAMESPACE** drop-down list, in addition to the **Virtual Machine Host** entry includes also the **Guest (classic)** entry.
1. On the **az104-11-vm0 | Metrics** blade, on the default chart, note that at this point, the **Metrics Namespace** drop-down list, in addition to the **Virtual Machine Host** entry includes also the **Guest (classic)** entry.
>**Note**: This is expected, since you enabled guest-level diagnostic settings.
1. In the **METRICS** drop-down list, review the list of available metrics.
1. In the **Metric** drop-down list, review the list of available metrics.
>**Note**: The list includes additional guest-level metrics not available when relying on the host-level monitoring only.
1. In the **METRICS** drop-down list, select **Memory\Available Bytes**, in the **AGGREGATION** drop-down list, select **Avg**, and review the resulting chart.
1. In the **Metric** drop-down list, select **Memory\Available Bytes**, in the **Aggregation** drop-down list, select **Avg**, and review the resulting chart.
#### Task 6: Review Azure Monitor functionality
1. In the Azure portal, search for and select **Monitor** and, on the **Monitor - Overview** blade, click **Metrics**.
1. In the chart pane on the right side of the blade, in the **SCOPE** drop-down list, click **+ Select a scope**.
1. In the Azure portal, search for and select **Monitor** and, on the **Monitor | Overview** blade, click **Metrics**.
1. On the **Select a scope** blade, on the **Browse** tab, navigate to the **az104-11-rg0** resource group, expand it, select the **az104-11-vm0** virtual machine within that resource group, and click **Apply**.
@ -194,11 +191,11 @@ In this task, you will configure Azure virtual machine diagnostic settings.
1. In the **Metric** drop-down list, select **Percentage CPU**, in the **Aggregation** drop-down list, select **Avg**, and review the resulting chart.
1. On the **Monitor - Metrics** blade, click **New alert rule**.
1. On the **Monitor | Metrics** blade, click **New alert rule**.
>**Note**: Creating an alert rule from Metrics is not supported for metrics from the Guest (classic) metric namespace. This can be accomplished by using Azure Resource Manager templates, as described in the document [Send Guest OS metrics to the Azure Monitor metric store using a Resource Manager template for a Windows virtual machine](https://docs.microsoft.com/en-us/azure/azure-monitor/platform/collect-custom-metrics-guestos-resource-manager-vm)
1. On the **Create alert rule** blade, in the **CONDITION** section, click the existing condition.
1. On the **Create alert rule** blade, in the **Condition** section, click the existing condition.
1. On the **Configure signal logic** blade, in the list of signals, in the **Alert logic** section, specify the following settings (leave others with their default values) and click **Done**:
@ -284,7 +281,17 @@ In this task, you will configure Azure virtual machine diagnostic settings.
1. On the **Select a scope** blade, navigate to the **az104-11-rg0** resource group, expand it, select **a104-11-vm0**, and click **Apply**.
1. Click **Example queries** in the toolbar, in the **Get started with sample queries** pane, review each tab, locate **Virtual machine available memory**, and click **Run**.
1. In the query window, paste the following query and click **Run**:
```
// Virtual Machine available memory
// Chart the VM's available memory over the last hour.
InsightsMetrics
| where TimeGenerated > ago(1h)
| where Name == "AvailableMB"
| project TimeGenerated, Name, Val
| render timechart
```
1. Click **Example queries** in the toolbar, in the **Get started with sample queries** pane, review each tab, locate **Track VM availability**, and click **Run**.