Management tools

Every tool is a door to the same Resource Manager

Resource Managerchecks and carries outmachinesdatabasesstorageAzure portala web site: point and clickAzure CLIaz vm create ...Azure PowerShellNew-AzVM ...CLOUD SHELLin the browserEvery tool sends the same requests to Azure Resource Manager, so every tool can do the same things.The portal suits looking around and one-off tasks. The CLI and PowerShell are typed commands, so they canbe saved as scripts and repeated. Cloud Shell runs either of them in a browser, already signed in, withnothing to install.

The portal, the CLI and PowerShell all call Azure Resource Manager. Cloud Shell hosts both in a browser.

Management tools · Going deeper

Which tool, when

Ways to manage AzureToolWhat it isChoose it whenAzure portalA web console with dashboardsexploring, one-off tasks, reading chartsAzure CLICommands starting "az", Bash stylescripting, and you know Linux shellsAzure PowerShellCmdlets such as New-AzVMscripting, and you know PowerShellCloud ShellA shell in the browser: Bash or PowerShellno tools installed, or not your own machineAzure mobile appA phone appchecking health and alerts away from the deskARM templates, BicepFiles that declare resourcesthe same deployment, many timesThe CLI and PowerShell both install on Windows, Linux and macOS.The choice between them is habit, not capability. Neither is "the Linux one" or "the Windows one".

The portal to explore, the CLI or PowerShell to script, templates to repeat.

Infrastructure as code

A template says what should exist, not what to do

TEMPLATEmain.bicepvm-web-1vm-web-2st-logsDeployment 1creates 3vm-web-1vm-web-2st-logsDeployment 2creates 0, same filevm-web-1vm-web-2st-logssql-ordersDeployment 3creates 1, one addedvm-web-1vm-web-2st-logssql-ordersA template states what should exist. Resource Manager compares that with what does, and makes up the difference.Green was created by that deployment; white was already there and left alone. This is infrastructure as code:the file is kept in version control, reviewed like code, and gives the same result every time it is deployed.ARM templates are written in JSON. Bicep is a shorter language that produces the same thing.

Deploying the same template twice creates 0 new resources. Adding one line creates 1.

Infrastructure as code · Going deeper

ARM and ARM templates

Why deploy with ARM templatesDeclarativeYou state what you want, not the commands to get thereRepeatableThe same template gives the same result, however many times it runsOrchestratedResource Manager works out the order and creates what it can in parallelModularSmall templates can be combined into larger ones and reusedExtensibleA template can run scripts for steps that it cannot declareAzure Resource Manager is the layer every request passes through, whatever tool sent it.It is where access control, tags, locks and policy are applied, which is why they behave the same in theportal, the CLI, PowerShell and templates.

Declarative, repeatable, orchestrated, modular and extensible.

Check yourself

TEMPLATEapp-shopsql-shopst-shopRESOURCE GROUPapp-shopsql-shopst-shop

The resource group already holds exactly what the template declares. The template is deployed again, unchanged. What does Resource Manager do?

Azure Arc

Arc brings machines outside Azure under the same management

AZUREResource ManagerAzure VMpolicy, tags, roles and monitoringYOUR DATACENTREsrv-01ANOTHER CLOUDvm-otherclusterAzure Arcconnects themsrv-01vm-otherclusterAzure Arc makes machines outside Azure appear in Azure as resources, so one set of tools manages all of them.The machines stay where they are. Arc gives each one an identity in Resource Manager, and from then on itcan be tagged, placed in a resource group, checked by Azure Policy and watched by Azure Monitor like any other.

Azure Arc projects servers and clusters from your datacentre and other clouds into Resource Manager.

Azure Arc · Going deeper

What Arc can manage

What Azure Arc can bring under Azure managementServersWindows and Linux machines, physical or virtual, anywhereKubernetes clustersClusters running in your datacentre or with another providerAzure data servicesAzure SQL Managed Instance and PostgreSQL running outside AzureSQL ServerInstances of SQL Server hosted outside AzureVirtual machinesMachines on platforms such as VMware vSphere and Azure LocalThe clue words for Arc are "hybrid", "multicloud" and "manage from one place".Arc is management, not migration: nothing is moved into Azure.

Servers, Kubernetes clusters, data services, SQL Server and virtual machines.

Service Health

Health comes in three views, each narrower than the last

regionsservicesAzure statusevery service, every regionService Healththe 6 you use, of 60ONE OF YOUR SQUARESvm-web-1availablevm-web-2unavailablesql-ordersavailableResource Healtheach resource of yoursAzure Service Health is three views, each narrower than the last.Azure status is a public page of major incidents across all of Azure. Service Health filters that to the services andregions you use, adds planned maintenance, and can alert you. Resource Health reports on each individualresource, including problems that are not part of any wider incident.

Azure status covers all 60 squares, Service Health the 6 you use, Resource Health each resource.

Service Health · Going deeper

Azure Advisor

Azure Advisor: recommendations in five categoriesCategoryA recommendation might beReliabilitySpread these machines across availability zonesSecurityTurn on multifactor authentication for these accountsPerformanceThis database would be faster with a missing index addedCostThis machine is mostly idle: make it smaller or shut it downOperational excellenceThis subscription is close to a service limitAdvisor looks at what you have deployed and suggests improvements. It recommends; it does not change anything.It is free. Service Health tells you what is wrong now. Advisor tells you what could be better.

Advisor recommends on reliability, security, performance, cost and operational excellence.

Check yourself

Azure statusno incidentsService Healthno issues for your servicesvm-app-3not responding

Both pages shown report no problems, yet one virtual machine has stopped responding. Where do you find the state of that machine?

Azure Monitor

Monitor gathers metrics and logs, then three tools put them to use

ApplicationsMachines and containersAzure resourcesSubscription and tenantOutside AzureAZURE MONITORMetricsnumbers over timeLogsrecords of eventsLog Analyticswrite queries over the logsAlertsnotify people or act when a rule is metApplication Insightsrequests, failures and speed of an appAzure Monitor collects metrics and logs from everything, then lets you query, alert and look inside applications.A metric is a number sampled regularly, such as processor use. A log is a record of something that happened.Monitor also draws them on dashboards and can scale resources in response.

Azure Monitor collects metrics and logs. Log Analytics queries, alerts notify, Application Insights watches apps.

Azure Monitor · Going deeper · 1 of 2

Log Analytics, alerts, Application Insights

The three parts of Azure Monitor the exam namesPartWhat it doesRememberLog AnalyticsRuns queries over collected logsthe query language is KQLAlertsWatches metrics or logs against a rulean action group says who is toldApplication InsightsTracks requests, response times, failuresfor apps in Azure or anywhere elseAn alert has a severity and a rule. When the rule is met it calls an action group.An action group can send email, a text message or a push notification, or start an automated action.Application Insights can also test an application from outside at intervals, to see whether it still answers.

Log Analytics queries, alerts call an action group, Application Insights tracks an app.

Azure Monitor · Going deeper · 2 of 2

Clue words for managing and monitoring

When the question saysThe service isBecause it"script it", "automate from a Linux shell"Azure CLIcommands, Bash style"from a browser, nothing installed"Cloud ShellCLI or PowerShell, hosted"deploy the same environment repeatedly"ARM template or Bicepinfrastructure as code"manage servers on-premises and in other clouds"Azure Arcprojects them into Azure"recommendations to cut cost or improve"Azure Advisorfive categories of advice"is there an outage in my region?"Service Healthyour services and regions"is this one machine healthy?"Resource Healthone resource of yours"query the logs"Log Analyticspart of Azure Monitor"notify the team when CPU passes 90%"Azure Monitor alertsrule and action group"response times and failures of a web app"Application Insightspart of Azure MonitorAdvisor advises, Service Health reports on Azure, and Monitor measures what is yours.

Advisor advises, Service Health reports on Azure, Monitor measures what is yours.

Check yourself

visitorsWeb appshop?requests, failures,response times

Developers want to see the request rate, response times and failures inside the web application shown. Which part of Azure Monitor is the box marked "?"

Lesson complete

You finished “Managing, deploying and monitoring Azure”

Answer the questions along the way to see your score here.

Open in a new tab