mediummultiple choiceObjective-mapped

A help desk analyst wants a query in Log Analytics that returns Azure virtual machines that have stopped sending a heartbeat for more than 15 minutes. Which KQL query should the analyst run?

Question 1mediummultiple choice
Full question →

A help desk analyst wants a query in Log Analytics that returns Azure virtual machines that have stopped sending a heartbeat for more than 15 minutes. Which KQL query should the analyst run?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Best answer

Heartbeat | summarize LastSeen=max(TimeGenerated) by Computer | where LastSeen < ago(15m)

This query uses the Heartbeat table to identify the most recent signal from each VM and filters for machines whose latest heartbeat is older than 15 minutes. That is the correct pattern for detecting VMs that are no longer reporting to Log Analytics or Azure Monitor. It is practical, concise, and directly aligned to troubleshooting agent connectivity or VM availability.

B

Distractor review

AzureActivity | where OperationNameValue contains 'Heartbeat' | summarize count() by ResourceGroup

AzureActivity tracks control-plane operations, not VM heartbeat telemetry, so it will not identify silent agents.

C

Distractor review

Perf | where CounterName == '% Processor Time' | summarize avg(CounterValue) by Computer

Perf is useful for performance counters, but CPU data does not indicate whether the VM has stopped sending heartbeat records.

D

Distractor review

SecurityEvent | where EventID == 4624 | summarize count() by Computer

SecurityEvent contains Windows security logs and successful sign-ins, which are unrelated to heartbeat reporting status.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Heartbeat | summarize LastSeen=max(TimeGenerated) by Computer | where LastSeen < ago(15m) — The Heartbeat table is the correct source for checking whether an Azure VM is still reporting to Log Analytics. By summarizing the latest TimeGenerated value for each computer and filtering for entries older than 15 minutes, the analyst can quickly find VMs that have gone quiet. This is a common troubleshooting pattern for agent connectivity, guest health, or onboarding problems in Azure Monitor. Why others are wrong: AzureActivity shows management operations, not heartbeat telemetry. Perf contains performance counters such as CPU or memory, but not the agent heartbeat signal. SecurityEvent is for Windows security logs and sign-in events, which do not indicate whether the VM is still sending monitoring data. The Heartbeat table is the only option that matches the problem directly.

What should I do if I get this AZ-104 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.