Question 723 of 1,170
Monitor and Maintain Azure ResourceshardMultiple ChoiceObjective-mapped

Quick Answer

The correct configuration is a diagnostic setting that streams AuditEvent logs to both a Log Analytics workspace and a storage account. This works because Azure Key Vault audit data is captured exclusively through the AuditEvent category in diagnostic settings; sending it to Log Analytics enables long-term retention of up to 18 months and powerful KQL-based search, while the storage account provides an independent second copy that remains intact even if the workspace retention policy is later shortened. On the AZ-104 exam, this scenario tests your understanding that diagnostic settings are the single mechanism for routing platform logs, and a common trap is assuming an action group or alert rule handles data retention—action groups are for notifications, not log storage. Remember the memory tip: “Stream to two, search and secure”—Log Analytics for search and retention, storage for a durable backup copy.

AZ-104 Monitor and Maintain Azure Resources Practice Question

This AZ-104 practice question tests your understanding of monitor and maintain azure resources. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: azure diagnostic settings export resource logs and metrics.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

An organization must retain Azure Key Vault audit data for 18 months, search the data in Log Analytics, and keep a second copy if the workspace retention policy is later shortened. The operations team already has an action group for notifications. What should be configured on the Key Vault?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a diagnostic setting that streams AuditEvent logs to Log Analytics and a storage account.

Option B is correct because Azure Key Vault audit data is captured via the AuditEvent category in diagnostic settings. By configuring a diagnostic setting to stream AuditEvent logs to both a Log Analytics workspace (for querying and long-term retention up to 18 months) and a storage account (for a second copy independent of workspace retention policy changes), the organization meets all requirements. The existing action group is not needed for this data retention and search scenario.

Key principle: Azure diagnostic settings export resource logs and metrics.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create an activity log alert and point it at the existing action group.

    Why it's wrong here

    Activity log alerts detect subscription events, but they do not store resource-level audit data for long-term searching.

  • Create a diagnostic setting that streams AuditEvent logs to Log Analytics and a storage account.

    Why this is correct

    A diagnostic setting on the Key Vault can export resource logs to Log Analytics for querying and also to a storage account for durable retention. That meets both investigation and long-term preservation requirements. The action group can still be used separately for notifications, but it does not replace the log collection path. This is the only option that addresses both searchable telemetry and an independent retained copy.

    Related concept

    Azure diagnostic settings export resource logs and metrics.

  • Create a metric alert on the Key Vault and archive the alert history.

    Why it's wrong here

    Metric alerts are useful for threshold-based monitoring, but they do not capture detailed audit events or provide retained raw log copies.

  • Enable only resource metrics and rely on workspace retention for compliance.

    Why it's wrong here

    Metrics do not contain the audit details required for key vault investigations, and workspace retention alone provides no second copy.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse activity log alerts or metric alerts with diagnostic settings, not realizing that audit data retention and search require streaming the AuditEvent category to Log Analytics and a storage account, not just monitoring or metrics.

Detailed technical explanation

How to think about this question

Diagnostic settings in Azure allow streaming of platform logs (like AuditEvent) to multiple destinations simultaneously—Log Analytics for KQL-based searching and Azure Storage for durable, immutable archival. The AuditEvent category captures all data plane operations (e.g., key get, secret set) and management plane operations, which are essential for compliance. When workspace retention is reduced, the storage account copy remains unaffected, ensuring a separate, policy-independent backup.

KKey Concepts to Remember

  • Azure diagnostic settings export resource logs and metrics.
  • Key Vault AuditEvent logs detail operations performed on keys, secrets, and certificates.
  • Diagnostic settings can stream logs to Log Analytics for search and a storage account for archival.
  • Streaming to a storage account provides an independent, durable copy of logs.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Azure diagnostic settings export resource logs and metrics.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Review azure diagnostic settings export resource logs and metrics., then practise related AZ-104 questions on the same topic to reinforce the concept.

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.

Practice this exam

Start a free AZ-104 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Monitor and Maintain Azure Resources — This question tests Monitor and Maintain Azure Resources — Azure diagnostic settings export resource logs and metrics..

What is the correct answer to this question?

The correct answer is: Create a diagnostic setting that streams AuditEvent logs to Log Analytics and a storage account. — Option B is correct because Azure Key Vault audit data is captured via the AuditEvent category in diagnostic settings. By configuring a diagnostic setting to stream AuditEvent logs to both a Log Analytics workspace (for querying and long-term retention up to 18 months) and a storage account (for a second copy independent of workspace retention policy changes), the organization meets all requirements. The existing action group is not needed for this data retention and search scenario.

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

Review azure diagnostic settings export resource logs and metrics., then practise related AZ-104 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Azure diagnostic settings export resource logs and metrics.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more ways this is tested on AZ-104

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Based on the exhibit, a security team wants to search Key Vault audit events in Log Analytics for 30 days and create alerts when secrets are accessed unexpectedly. The current diagnostic configuration is not sending the right data. What should the administrator enable?

medium
  • A.Enable AuditEvent and send the logs to a Log Analytics workspace.
  • B.Enable only AllMetrics and keep sending data to the storage account.
  • C.Create a private endpoint for the Key Vault.
  • D.Turn on a resource lock with the ReadOnly effect.

Why A: Option A is correct because the Key Vault diagnostic setting must include the AuditEvent category to capture all audit logs, including secret operations. Sending these logs to a Log Analytics workspace enables the security team to query them for 30 days and create alerts on unexpected secret access. Without AuditEvent enabled, no audit data is available for analysis.

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.