AZ-104 exam dumps

AZ-104 practice question 250 of 289

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

AZ-104 Question 250

Select 2

You manage an Azure App Service and need to collect and retain diagnostic logs for long-term analysis. You are required to forward logs to a Log Analytics workspace for advanced queries and also archive them to a storage account. Which two actions should you configure in the Azure Monitor diagnostic settings for the App Service to meet these requirements?

  1. A

    Create a new diagnostic setting targeting a Log Analytics workspace and enable Application Logging under this setting

  2. B

    Enable 'Send to Event Hub' to stream all App Service logs to Azure automatically

  3. C

    In the same diagnostic setting, select 'Archive to a storage account' and configure a retention policy

  4. D

    Enable Application Insights to collect all logs without configuring diagnostic settings

Show answer and explanation

Correct answers: A, C

Explanation

To fulfill both the advanced analytics and long-term retention requirements, you must configure a diagnostic setting that sends logs to a Log Analytics workspace and also archives them to a storage account. Using 'Send to Event Hub' or relying solely on Application Insights would not meet the complete requirement for long-term retention and advanced queries.

  • A. Correct.

    Configuring a diagnostic setting that sends logs to a Log Analytics workspace enables advanced queries and dashboards in Azure Monitor

  • B. Incorrect.

    Sending logs to Event Hub provides real-time streaming, but it is not necessary for long-term retention and advanced queries in this scenario

  • C. Correct.

    Archiving logs to a storage account with a specified retention policy ensures you meet long-term data storage requirements

  • D. Incorrect.

    Application Insights is primarily for application performance management, but it does not replace the need for configuring diagnostic settings to forward and archive logs as described

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