{
    "id": "5269c285-7fb0-432e-823c-55cf8bc1ddf3",
    "name": "Monitor Resources with Azure Monitor",
    "slug": "monitor-resources-with-azure-monitor",
    "status": "published",
    "lab_type": "azure",
    "is_sample": false,
    "duration_in_seconds": 1200,
    "metadata": {},
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2020-08-11T12:14:09.579299Z",
    "modified": "2023-10-03T18:56:44.861510Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": null,
    "learning_areas": [],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": false,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "is_trackable": false,
    "cpe_credits": null,
    "is_skill_check": false,
    "external_url": "https://portal.azure.com/",
    "solution_video": "e012d76e-08f3-4dcc-b339-4a6b3fba2d7b",
    "explanation_video": null,
    "description": "# Task: Monitor Resources with Azure Monitor\n\n## Video: Azure Monitor\n\n**Estimated time:** 10 minutes\n\n## Goal\n\nThe goal of this task is to use the Azure monitor.  This includes setting diagnostic logging for resources, monitoring activity and creating performance graphs.\n\n## Pre-requisites\n\n1. Non-production Azure subscription\n2. A virtual machine with required resources\n\n## Requirements\n\n1. Requirement 1: Configure monitoring for Azure resources\n1. Requirement 2: Generate activity\n1. Requirement 3: Monitor activity logs with Azure monitor\n1. Requirement 4: Generate a performance graph with Azure monitor\n\n## Pre-requisite setup\n\nThis task requires a virtual machine, network interface, public IP address, virtual network and bastion host.  To deploy the resources required for this task, run the following from a bash cloud shell:\n\n```bash\ncurl https://inedemoassets.blob.core.windows.net/taskfiles/azure_admin/deploy-3509T140-pre.sh | sh\n```\n\nThis script will deploy the following resources:\n\n|Setting|Value|\n|---|---|\n|Virtual network|**webApp-vnet**|\n|NSG|**webApp-nsg**|\n|VM|**webApp-vm**|\n|VM public IP|**webApp-vm-pip**|\n|Storage account|**&lt;a unique name&gt;**|\n|Web app|**&lt;a unique name&gt;**|\n|Bastion|**webApp-bastion**|\n|Bastion public IP|**webApp-bastion-pip**|\n\n*Support resources not shown.*\n\n***Important: Record the password output.  You will need it for requirement 3.***\n\n## Requirement 1: Configure monitoring for Azure resources\n\nTo meet this requirement you must configure diagnostics for several resources.  Configure each of the following resources to write 7 days* worth of diagnostic data to the storage account that was provisioned during the pre-requisite setup:\n\n- **webApp-bastion** Bastion host\n- **webApp-nic** network interface\n- **webApp-bastion-pip** public IP\n- **webApp-vm** virtual machine\n\n**Not all resources will allow you to set the retention period.*\n\n## Requirement 2: Generate activity\n\nFor this requirement you will log onto the virtual machine using the Bastion connection and generate a network load.  You will install software on the virtual machine to generate the load.  To complete this requirement:\n\n- Connect to the **webApp-vm** virtual machine via the Bastion host:\n  - Navigate to the **webApp-vm** blade in the Azure portal\n  - Select the **Connect** button and choose the Bastion option.\n  - Login using **student** for the user name and the password generated during the pre-requisite deployment.\n- Generate network traffic by running the following statements:\n\n  ```bash\n  sudo apt-get update\n  sudo apt-get install -y nodejs\n  sudo apt-get install -y npm\n  ```\n\n## Requirement 3: Monitor activity logs with Azure monitor\n\nNow you need to confirm that activity for the resources is accessible from Azure monitor.  Navigate to the Activity log view of the **monitor** blade in the Azure portal.  Verify activity logging as follows:\n\n- Filter the list to only show activity from the **task-mntr-rg** resource group.\n- Add a filter to only show virtual machines.\n- Find the activity record for configuring diagnostics on the virtual machine.\n- View the JSON data for the record.\n  \n## Requirement 4: Generate a performance graph with Azure monitor\n\nFor the final requirement, you will build a metrics chart in Azure monitor.  Display data for the last 30 minutes for the following metrics:\n\n  |Resource|Metric|\n  |---|---|\n  |webApp-vm|**Disk write bytes**|\n  |webApp-nic|**Bytes received**|\n  |webApp-pip|**Byte count**|\n\n## Cleanup\n\nWhen you have completed this task, delete the **task-mntr-rg** resource group.",
    "description_html": "<h1>Task: Monitor Resources with Azure Monitor</h1>\n<h2>Video: Azure Monitor</h2>\n<p><strong>Estimated time:</strong> 10 minutes</p>\n<h2>Goal</h2>\n<p>The goal of this task is to use the Azure monitor.  This includes setting diagnostic logging for resources, monitoring activity and creating performance graphs.</p>\n<h2>Pre-requisites</h2>\n<ol>\n<li>Non-production Azure subscription</li>\n<li>A virtual machine with required resources</li>\n</ol>\n<h2>Requirements</h2>\n<ol>\n<li>Requirement 1: Configure monitoring for Azure resources</li>\n<li>Requirement 2: Generate activity</li>\n<li>Requirement 3: Monitor activity logs with Azure monitor</li>\n<li>Requirement 4: Generate a performance graph with Azure monitor</li>\n</ol>\n<h2>Pre-requisite setup</h2>\n<p>This task requires a virtual machine, network interface, public IP address, virtual network and bastion host.  To deploy the resources required for this task, run the following from a bash cloud shell:</p>\n<pre class=\"codehilite\"><code class=\"language-bash\">curl https://inedemoassets.blob.core.windows.net/taskfiles/azure_admin/deploy-3509T140-pre.sh | sh</code></pre>\n\n<p>This script will deploy the following resources:</p>\n<table>\n<thead>\n<tr>\n<th>Setting</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Virtual network</td>\n<td><strong>webApp-vnet</strong></td>\n</tr>\n<tr>\n<td>NSG</td>\n<td><strong>webApp-nsg</strong></td>\n</tr>\n<tr>\n<td>VM</td>\n<td><strong>webApp-vm</strong></td>\n</tr>\n<tr>\n<td>VM public IP</td>\n<td><strong>webApp-vm-pip</strong></td>\n</tr>\n<tr>\n<td>Storage account</td>\n<td><strong>&lt;a unique name&gt;</strong></td>\n</tr>\n<tr>\n<td>Web app</td>\n<td><strong>&lt;a unique name&gt;</strong></td>\n</tr>\n<tr>\n<td>Bastion</td>\n<td><strong>webApp-bastion</strong></td>\n</tr>\n<tr>\n<td>Bastion public IP</td>\n<td><strong>webApp-bastion-pip</strong></td>\n</tr>\n</tbody>\n</table>\n<p><em>Support resources not shown.</em></p>\n<p><strong><em>Important: Record the password output.  You will need it for requirement 3.</em></strong></p>\n<h2>Requirement 1: Configure monitoring for Azure resources</h2>\n<p>To meet this requirement you must configure diagnostics for several resources.  Configure each of the following resources to write 7 days* worth of diagnostic data to the storage account that was provisioned during the pre-requisite setup:</p>\n<ul>\n<li><strong>webApp-bastion</strong> Bastion host</li>\n<li><strong>webApp-nic</strong> network interface</li>\n<li><strong>webApp-bastion-pip</strong> public IP</li>\n<li><strong>webApp-vm</strong> virtual machine</li>\n</ul>\n<p>*<em>Not all resources will allow you to set the retention period.</em></p>\n<h2>Requirement 2: Generate activity</h2>\n<p>For this requirement you will log onto the virtual machine using the Bastion connection and generate a network load.  You will install software on the virtual machine to generate the load.  To complete this requirement:</p>\n<ul>\n<li>Connect to the <strong>webApp-vm</strong> virtual machine via the Bastion host:</li>\n<li>Navigate to the <strong>webApp-vm</strong> blade in the Azure portal</li>\n<li>Select the <strong>Connect</strong> button and choose the Bastion option.</li>\n<li>Login using <strong>student</strong> for the user name and the password generated during the pre-requisite deployment.</li>\n<li>Generate network traffic by running the following statements:</li>\n</ul>\n<pre class=\"codehilite\"><code class=\"language-bash\">sudo apt-get update\nsudo apt-get install -y nodejs\nsudo apt-get install -y npm</code></pre>\n\n<h2>Requirement 3: Monitor activity logs with Azure monitor</h2>\n<p>Now you need to confirm that activity for the resources is accessible from Azure monitor.  Navigate to the Activity log view of the <strong>monitor</strong> blade in the Azure portal.  Verify activity logging as follows:</p>\n<ul>\n<li>Filter the list to only show activity from the <strong>task-mntr-rg</strong> resource group.</li>\n<li>Add a filter to only show virtual machines.</li>\n<li>Find the activity record for configuring diagnostics on the virtual machine.</li>\n<li>View the JSON data for the record.</li>\n</ul>\n<h2>Requirement 4: Generate a performance graph with Azure monitor</h2>\n<p>For the final requirement, you will build a metrics chart in Azure monitor.  Display data for the last 30 minutes for the following metrics:</p>\n<table>\n<thead>\n<tr>\n<th>Resource</th>\n<th>Metric</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>webApp-vm</td>\n<td><strong>Disk write bytes</strong></td>\n</tr>\n<tr>\n<td>webApp-nic</td>\n<td><strong>Bytes received</strong></td>\n</tr>\n<tr>\n<td>webApp-pip</td>\n<td><strong>Byte count</strong></td>\n</tr>\n</tbody>\n</table>\n<h2>Cleanup</h2>\n<p>When you have completed this task, delete the <strong>task-mntr-rg</strong> resource group.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-06-16T16:42:39Z",
    "solutions": "",
    "solutions_html": "",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "default",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": []
}