Hands-On Lab820 words

Lab: Exploring Azure Monitoring & Governance Tools

Describe monitoring tools in Azure

Lab: Exploring Azure Monitoring & Governance Tools

This hands-on lab introduces you to the core monitoring and advisory tools in Microsoft Azure: Azure Monitor, Azure Service Health, and Azure Advisor. You will deploy a basic resource to observe how Azure collects telemetry and provides optimization recommendations.

[!WARNING] Always run the commands in the Teardown section at the end of this lab to avoid unexpected charges to your Azure account.

Prerequisites

  • Azure Subscription: An active Azure free account or a sandbox subscription.
  • Interface: Azure Cloud Shell (Bash) or Azure CLI installed locally.
  • Permissions: Contributor or Owner role on the subscription to create resource groups and storage accounts.

Learning Objectives

  • Deploy an Azure Storage Account via CLI to generate resource data.
  • Access Azure Monitor to view real-time metrics and telemetry.
  • Utilize Azure Service Health to identify regional outages or planned maintenance.
  • Interpret Azure Advisor recommendations for cost, security, and performance.

Architecture Overview

In this lab, you will interact with the monitoring plane of Azure. The following diagram illustrates how telemetry flows from your resources into the management tools.

Loading Diagram...

Step-by-Step Instructions

Step 1: Create a Resource Group and Storage Account

To see monitoring in action, we need a resource to monitor. We will create a storage account because it generates immediate metrics.

bash
# Replace <YOUR_REGION> with a region like 'eastus' az group create --name brainybee-monitor-lab-rg --location <YOUR_REGION> # Create the storage account (name must be globally unique) az storage account create \ --name brainybeelab$RANDOM \ --resource-group brainybee-monitor-lab-rg \ --location <YOUR_REGION> \ --sku Standard_LRS
Console alternative
  1. Search for Storage accounts in the top search bar.
  2. Click + Create.
  3. Create a new Resource Group: brainybee-monitor-lab-rg.
  4. Storage account name: brainybeelab + a random number.
  5. Region: Pick any (e.g., East US).
  6. Click Review + create, then Create.

Step 2: Explore Azure Monitor Metrics

Azure Monitor collects performance data (metrics) from your resources automatically.

bash
# List the metrics available for your storage account az monitor metrics list-definitions --resource "/subscriptions/<YOUR_SUBSCRIPTION_ID>/resourceGroups/brainybee-monitor-lab-rg/providers/Microsoft.Storage/storageAccounts/<YOUR_STORAGE_ACCOUNT_NAME>"

[!TIP] In the CLI, use az account show --query id -o tsv to find your Subscription ID.

Console alternative
  1. Open your new Storage Account in the portal.
  2. On the left menu, scroll to the Monitoring section and select Metrics.
  3. Under Metric, select Used Capacity or Transactions.
  4. Observe the chart (it may be flat as the resource is new).

Step 3: Check Azure Service Health

Service Health tracks the status of Azure services globally and in your specific regions.

Console/Portal View (Recommended)
  1. In the Azure Portal search bar, type Service Health.
  2. Click Service issues on the left to see current outages.
  3. Click Planned maintenance to see upcoming work that might affect your resources.
  4. Click Health history to see past incidents.

Step 4: Review Azure Advisor Recommendations

Azure Advisor analyzes your configurations and suggests improvements based on best practices.

bash
# List all recommendations (Note: New accounts may have empty results for 24 hours) az advisor recommendation list
Console alternative
  1. Search for Advisor in the portal.
  2. View the Overview dashboard.
  3. Click into Cost or Security to see specific suggestions.

Visualizing the Monitoring Stack

The following diagram shows the logical relationship between logs, metrics, and the monitoring interfaces.

\begin{tikzpicture} [node distance=2cm, box/.style={rectangle, draw, fill=blue!10, text width=2.5cm, align=center, minimum height=1cm}]

\node [box] (data) {Resource Telemetry$Logs & Metrics)}; \node [box, right=of data] (monitor) {Azure Monitor$Central Hub)}; \node [box, above right=0.5cm and 2cm of monitor] (insights) {Application Insights}; \node [box, below right=0.5cm and 2cm of monitor] (analytics) {Log Analytics};

\draw [->, thick] (data) -- (monitor); \draw [->, dashed] (monitor) -- (insights); \draw [->, dashed] (monitor) -- (analytics);

\node [below=1cm of monitor, font=\small, italic] {Action: Alerts, Dashboards, Scaling}; \end{tikzpicture}

Checkpoints

CheckpointExpected Result
Resource Creationaz storage account show returns a JSON object with provisioningState: Succeeded.
Azure MonitorThe Portal Metrics chart shows at least one data point for 'Used Capacity'.
Service HealthThe dashboard displays "No service issues found" for your selected region.

Troubleshooting

IssueCauseSolution
"ResourceNotFound"CLI commands used incorrect resource group or account name.Run az storage account list -o table to verify names.
Advisor is emptyRecommendations take up to 24 hours to generate for new resources.Check back after 24 hours or look at the 'Security' tab for default policy items.
Metrics show no dataThe storage account is idle and has no traffic.Upload a small file via the portal 'Containers' section to trigger a transaction.

Teardown

To ensure you are not charged for the resources created during this lab, delete the resource group.

bash
az group delete --name brainybee-monitor-lab-rg --yes --no-wait

[!IMPORTANT] The --no-wait flag allows the command to return immediately while Azure deletes the resources in the background.

Ready to study Microsoft Azure Fundamentals (AZ-900)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free