WebMagicInformatica
AZ-104 practice questions

AZ-104 practice questions: Monitor and maintain Azure resources

5 free questions on Monitor and maintain Azure resources, 14% of the Azure Administrator Associate (AZ-104) exam. Try each one, then open the answer and explanation. None of them are in the free readiness check, so you can still take it fresh.

Question 1

Windows VMs send heartbeat data to a Log Analytics workspace. Which Kusto query returns the most recent heartbeat time for each computer?

  1. A.

    Heartbeat | summarize count() by TimeGenerated

  2. B.

    Heartbeat | where Computer == max(TimeGenerated)

  3. C.

    Heartbeat | summarize LastHeartbeat = max(TimeGenerated) by Computer

  4. D.

    Heartbeat | project Computer | distinct

Show answer and explanation

Answer: C

summarize ... by Computer groups rows per computer, and max(TimeGenerated) finds the latest heartbeat for each.

  • Heartbeat | summarize count() by TimeGenerated: It counts rows per timestamp, not the latest time per computer.
  • Heartbeat | where Computer == max(TimeGenerated): This compares a computer name to a time value and is not valid logic.
  • Heartbeat | project Computer | distinct: It lists unique computers but returns no time information.
Question 2

A VM cannot connect to a database on TCP port 1433 in another subnet. You suspect that an NSG rule is blocking traffic and you need to know which rule. Which Network Watcher feature should you use?

  1. A.

    Packet capture.

  2. B.

    Traffic Analytics.

  3. C.

    Next hop.

  4. D.

    IP flow verify.

Show answer and explanation

Answer: D

IP flow verify tests whether a packet with a given 5-tuple to or from a VM is allowed or denied, and names the NSG rule that made the decision.

  • Packet capture.: It records packets on the VM for analysis, but does not tell you which NSG rule dropped them.
  • Traffic Analytics.: It summarises historical flow-log data and is not a point-in-time test of a specific flow.
  • Next hop.: It shows the routing next hop and route table for a destination, which diagnoses routing problems, not NSG rules.
Question 3Choose 2

Which TWO actions are required to collect Windows event logs from Azure VMs into a Log Analytics workspace with the current Azure Monitor approach? (Choose two.)

  1. A.

    Install the Azure Monitor Agent on the VMs.

  2. B.

    Install the legacy Log Analytics (MMA) agent.

  3. C.

    Enable boot diagnostics on each VM.

  4. D.

    Create a service endpoint for Microsoft.Storage.

  5. E.

    Create a data collection rule that specifies the event logs and the destination workspace, and associate it with the VMs.

Show answer and explanation

Answer: A and E

The Azure Monitor Agent is configured through data collection rules, which define what to collect and where to send it.

  • Install the legacy Log Analytics (MMA) agent.: The legacy agent has been retired in favour of Azure Monitor Agent.
  • Enable boot diagnostics on each VM.: Boot diagnostics capture start-up screenshots and logs; it does not collect event logs.
  • Create a service endpoint for Microsoft.Storage.: It does not collect logs.
Question 4

You need to send the subscription's Activity Log to a Log Analytics workspace and keep a copy in a storage account for one year. What should you configure?

  1. A.

    A budget alert.

  2. B.

    A resource lock.

  3. C.

    A diagnostic setting for the Activity Log with the workspace and storage account as destinations.

  4. D.

    A deployment slot.

Show answer and explanation

Answer: C

A diagnostic setting routes logs and metrics to Log Analytics, storage, Event Hubs and other destinations.

  • A budget alert.: Budgets monitor costs.
  • A resource lock.: Locks protect resources and don't route logs.
  • A deployment slot.: This is an App Service feature.
Question 5

Which Kusto query returns the average CPU percentage for each computer in five-minute intervals?

  1. A.

    Perf | where CounterName == "% Processor Time" | summarize avg(CounterValue) by Computer, bin(TimeGenerated, 5m)

  2. B.

    Perf | where CounterName == "% Processor Time" | count

  3. C.

    Perf | summarize max(Computer) by CounterValue

  4. D.

    Perf | project Computer | take 5

Show answer and explanation

Answer: A

summarize avg(...) by Computer, bin(TimeGenerated, 5m) groups the readings per computer into five-minute buckets.

  • Perf | where CounterName == "% Processor Time" | count: It returns a single count of rows only.
  • Perf | summarize max(Computer) by CounterValue: It aggregates the wrong columns.
  • Perf | project Computer | take 5: It returns five names and no averages.

How ready are you for AZ-104?

Take the free readiness check: 15 questions from every exam domain in 20 minutes, with your score per domain.

  • 20 minutes
  • 15 questions
  • Free with an account

More AZ-104 practice by topic

Back to the AZ-104 practice test →

Independent practice material written from the official exam guide. Not affiliated with or endorsed by the exam provider.