You have an Azure VPN Gateway named `vng-prod-east` that connects an on-premises network to an Azure Virtual Network. You need to configure diagnostic logging and monitoring for `vng-prod-east` to meet the following requirements:
- Send all VPN tunnel resource health and connection status logs to a Log Analytics workspace named `law-ops` for query analysis.
- Route all gateway metrics to a storage account named `sa-monitoring-archive` for long-term retention.
Which of the following configuration actions should you perform to meet these requirements? (Select TWO).
- Create a diagnostic setting on `vng-prod-east`, select the `TunnelDiagnostic` and `GatewayDiagnostic` log categories, and select Send to Log Analytics workspace with `law-ops` as the destination.Answer
- Create a diagnostic setting on `vng-prod-east`, select the `AllMetrics` metric category, and select Archive to a storage account with `sa-monitoring-archive` as the destination.Answer
- CCreate a diagnostic setting on `law-ops`, select the `TunnelDiagnostic` and `GatewayDiagnostic` log categories, and select Send to Log Analytics workspace with `vng-prod-east` as the destination.
- DCreate a diagnostic setting on `vng-prod-east`, select the `AllMetrics` metric category, select Archive to a storage account with `sa-monitoring-archive` as the destination, and instruct team members to access the archive using subscription Contributor permissions without data plane roles.
Answer
Create a diagnostic setting on the VPN Gateway sending the required logs to the Log Analytics workspace, and create a diagnostic setting on the VPN Gateway archiving all metrics to the storage account.
To satisfy the requirements, diagnostic settings must be created directly on the source resource, `vng-prod-east`. One setting or configuration block must route the relevant VPN gateway log categories (`TunnelDiagnostic` and `GatewayDiagnostic`) to the Log Analytics workspace `law-ops` for query capability. A second setting or configuration block must route the metrics (`AllMetrics`) to the target storage account `sa-monitoring-archive` for long-term archiving.
Step-by-Step Solution
Key Concept
Azure Monitor diagnostic settings are configured on a source resource to route specific log and metric categories to destination endpoints, such as Log Analytics or Azure Storage.