Bird
Raised Fist0
Azurecloud~5 mins

Azure dashboards - Commands & Configuration

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Introduction
Azure dashboards help you see important information about your cloud resources in one place. They solve the problem of checking many services separately by showing data and charts together on a single screen.
When you want to monitor the health of your web app and database together.
When you need to share cloud resource status with your team in a simple view.
When you want to track usage and costs of your Azure services visually.
When you want to create a custom view of metrics and logs for your project.
When you want to quickly spot issues by looking at charts and alerts on one page.
Commands
This command logs you into your Azure account so you can manage resources and dashboards.
Terminal
az login
Expected OutputExpected
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ABCD1234 to authenticate. You have logged in. Now let us find all the subscriptions to which you have access...
This command creates a new Azure dashboard named 'myDashboard' in the specified resource group and location using the configuration in 'dashboard.json'.
Terminal
az monitor dashboard create --name myDashboard --resource-group myResourceGroup --location eastus --input-path dashboard.json
Expected OutputExpected
{ "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Portal/dashboards/myDashboard", "name": "myDashboard", "type": "Microsoft.Portal/dashboards", "location": "eastus", "properties": { "lenses": { ... }, "metadata": { ... } } }
→
--name - Sets the name of the dashboard.
→
--resource-group - Specifies the resource group where the dashboard will be created.
→
--input-path - Path to the JSON file that defines the dashboard layout and content.
→
--location - Specifies the Azure region where the dashboard will be created.
This command retrieves and shows the details of the dashboard named 'myDashboard' to verify it was created correctly.
Terminal
az monitor dashboard show --name myDashboard --resource-group myResourceGroup
Expected OutputExpected
{ "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Portal/dashboards/myDashboard", "name": "myDashboard", "location": "eastus", "properties": { "lenses": { ... }, "metadata": { ... } } }
→
--name - Specifies the dashboard name to show.
→
--resource-group - Specifies the resource group of the dashboard.
This command deletes the dashboard named 'myDashboard' from the resource group when it is no longer needed.
Terminal
az monitor dashboard delete --name myDashboard --resource-group myResourceGroup
Expected OutputExpected
No output (command runs silently)
→
--name - Specifies the dashboard name to delete.
→
--resource-group - Specifies the resource group of the dashboard.
Key Concept

If you remember nothing else from this pattern, remember: Azure dashboards let you combine important cloud data visually in one place for easy monitoring and sharing.

Common Mistakes
Trying to create a dashboard without logging in first.
The Azure CLI needs you to be logged in to know which account and subscriptions to use.
Always run 'az login' before managing dashboards.
Using a dashboard JSON file with invalid or missing layout details.
Azure will reject the dashboard creation if the JSON is not properly structured.
Validate your dashboard JSON file with Azure portal or schema before using it.
Not specifying the resource group when creating or deleting dashboards.
Azure needs the resource group to locate the dashboard resource correctly.
Always include the --resource-group flag with the correct group name.
Summary
Use 'az login' to sign in to your Azure account before managing dashboards.
Create dashboards with 'az monitor dashboard create' using a JSON file to define layout and content.
Verify dashboards with 'az monitor dashboard show' and clean up with 'az monitor dashboard delete'.

Practice

(1/5)
1. What is the main purpose of an Azure dashboard?
easy
A. To manage user access permissions
B. To provide a single view of cloud resources and their status
C. To write code for Azure functions
D. To create virtual machines

Solution

  1. Step 1: Understand Azure dashboard role

    Azure dashboards show a combined view of your cloud resources and their health.
  2. Step 2: Compare options

    Options A, B, and D describe other Azure features, not dashboards.
  3. Final Answer:

    To provide a single view of cloud resources and their status -> Option B
  4. Quick Check:

    Dashboard = resource overview [OK]
Hint: Dashboards show resource status in one place [OK]
Common Mistakes:
  • Confusing dashboards with coding or VM creation
  • Thinking dashboards manage permissions
  • Assuming dashboards are for resource creation
2. Which of the following is the correct way to add a tile to an Azure dashboard?
easy
A. Click 'Add tile' and select the resource or metric to display
B. Write a JSON script in the dashboard editor
C. Use Azure CLI to create a dashboard tile
D. Upload a CSV file with resource data

Solution

  1. Step 1: Recall dashboard customization steps

    Adding a tile is done by clicking 'Add tile' and choosing what to show.
  2. Step 2: Evaluate other options

    Options B, C, and D are not standard ways to add tiles in the Azure portal dashboard UI.
  3. Final Answer:

    Click 'Add tile' and select the resource or metric to display -> Option A
  4. Quick Check:

    Add tile = click and select [OK]
Hint: Add tiles via dashboard UI, no coding needed [OK]
Common Mistakes:
  • Trying to add tiles by scripting or CLI
  • Uploading files instead of using UI
  • Confusing tile addition with resource creation
3. You have created a dashboard with a metric tile showing CPU usage. What will happen if the monitored VM is deleted?
medium
A. The tile will continue showing old data indefinitely
B. The tile will automatically show data from another VM
C. The dashboard will delete itself
D. The tile will show an error or no data

Solution

  1. Step 1: Understand dashboard tile data source

    Tiles depend on live data from resources; if the VM is deleted, data stops.
  2. Step 2: Analyze tile behavior on resource deletion

    The tile cannot show data from another VM automatically, nor does the dashboard delete itself. Old data is not kept indefinitely.
  3. Final Answer:

    The tile will show an error or no data -> Option D
  4. Quick Check:

    Deleted VM = tile error/no data [OK]
Hint: Deleted resource tiles show errors, no auto-switch [OK]
Common Mistakes:
  • Assuming tiles auto-switch to other resources
  • Thinking dashboards delete with resources
  • Believing tiles keep old data forever
4. You tried to share your Azure dashboard with a colleague, but they cannot see any tiles. What is the most likely cause?
medium
A. The colleague lacks permission to view the underlying resources
B. The dashboard was not saved before sharing
C. Azure dashboards cannot be shared
D. The colleague's browser does not support Azure portal

Solution

  1. Step 1: Understand sharing requirements

    Sharing a dashboard requires the viewer to have access to the resources shown.
  2. Step 2: Evaluate other options

    Dashboards can be saved and shared; browser support is broad; lack of permissions is the common cause of missing tiles.
  3. Final Answer:

    The colleague lacks permission to view the underlying resources -> Option A
  4. Quick Check:

    Missing tiles = permission issue [OK]
Hint: Check viewer permissions if tiles are missing [OK]
Common Mistakes:
  • Assuming dashboards cannot be shared
  • Forgetting to save before sharing
  • Blaming browser compatibility first
5. You want to create a dashboard that shows CPU usage, memory usage, and network traffic for multiple VMs in different subscriptions. What is the best approach?
hard
A. Create a dashboard in each subscription separately and switch between them
B. Create a single dashboard in your home subscription and add tiles from all subscriptions using resource IDs
C. Use Azure Monitor workbooks instead of dashboards for cross-subscription views
D. Export VM metrics to Excel and manually combine data

Solution

  1. Step 1: Understand cross-subscription dashboard limits

    Azure dashboards do not natively support tiles from multiple subscriptions in one dashboard.
  2. Step 2: Identify best tool for cross-subscription monitoring

    Azure Monitor workbooks allow combining data from multiple subscriptions in one view.
  3. Step 3: Evaluate other options

    Creating separate dashboards or manual Excel exports are less efficient; adding tiles from other subscriptions directly is not supported.
  4. Final Answer:

    Use Azure Monitor workbooks instead of dashboards for cross-subscription views -> Option C
  5. Quick Check:

    Cross-subscription = use workbooks [OK]
Hint: Use workbooks for multi-subscription monitoring [OK]
Common Mistakes:
  • Trying to add tiles from multiple subscriptions in one dashboard
  • Relying on manual data exports
  • Not knowing about Azure Monitor workbooks