You have an Azure Application Gateway named `appgw-prod` that has Web Application Firewall (WAF) enabled.
You need to collect the WAF firewall logs to meet the following requirements:
- Run interactive KQL queries on the logs inside the Azure portal.
- Stream the logs to an external, third-party Security Information and Event Management (SIEM) system in real-time.
Which diagnostic settings configuration should you implement for `appgw-prod`?
- ACreate a single diagnostic setting. Select the `ApplicationGatewayFirewallLog` log category, and configure the destinations to send to both a Storage account and an Event Hub.
- Create a single diagnostic setting. Select the `ApplicationGatewayFirewallLog` log category, and configure the destinations to send to both a Log Analytics workspace and an Event Hub.Answer
- CCreate a single diagnostic setting. Select the `ApplicationGatewayFirewallLog` log category, and configure the destinations to send to both a Log Analytics workspace and a Storage account.
- DCreate a single diagnostic setting. Select the `ApplicationGatewayFirewallLog` log category, send the logs to a Storage account, and assign the Reader role to the SIEM service principal on the storage account.
Answer
Create a single diagnostic setting. Select the ApplicationGatewayFirewallLog log category, and configure the destinations to send to both a Log Analytics workspace and an Event Hub.
To satisfy both requirements, the firewall logs must be sent to a Log Analytics workspace for interactive KQL querying and to an Event Hub for real-time streaming to a third-party SIEM. Azure Monitor diagnostic settings allow selecting multiple destinations within a single configuration.
Step-by-Step Solution
Key Concept
Azure Monitor diagnostic settings allow you to route resource logs to different destinations (Log Analytics workspaces, Storage accounts, Event Hubs, or partner solutions) depending on your querying, retention, and integration requirements.