AZ-104 exam dumps

AZ-104 practice question 251 of 289

Microsoft Certified: Azure Administrator Associate. Associate level, Microsoft. Free question with the correct answer and a full explanation.

AZ-104 Question 251

Select 2

Your company runs a line-of-business web application on Azure App Service. A new compliance requirement mandates that all web server logs must be stored in a single Log Analytics workspace for a minimum of 90 days. Which of the following actions should you perform to meet this requirement? (Choose two)

  1. A

    Create a new diagnostic setting on the App Service to send logs to an existing Log Analytics workspace

  2. B

    Enable Azure Monitor alerts to automatically collect logs and store them in Azure Storage

  3. C

    Set the retention period to 90 days in the properties of the Log Analytics workspace

  4. D

    Use Azure Monitor for containers to collect logs from the web application

Show answer and explanation

Correct answers: A, C

Explanation

To satisfy the compliance requirement, you must create a diagnostic setting to route logs to a Log Analytics workspace and configure that workspace’s retention to meet the 90-day mandate. Alerts or container-focused monitoring do not address this specific need.

  • A. Correct.

    Creating a diagnostic setting on the App Service and sending logs to a Log Analytics workspace is essential for centralizing and storing logs in Azure Monitor.

  • B. Incorrect.

    Enabling alerts only notifies you based on conditions; it does not automatically collect and store logs for auditing or long-term retention.

  • C. Correct.

    Configuring the workspace retention period ensures that logs are preserved for the required duration (90 days) in the Log Analytics workspace.

  • D. Incorrect.

    Azure Monitor for containers is specifically designed for containerized environments such as Azure Kubernetes Service (AKS), not for standard web applications.

Timed practice exam

Take a AZ-104 practice test under exam conditions

60 questions in 60 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam