How to Collect Detailed Cloud Armor WAF Logs for Troubleshooting
Customers complain about error messages when they access your organization's website. You suspect that the web application firewall rules configured in Cloud Armor are too strict. You want to collect request logs to investigate what triggered the rules and blocked the traffic. What should you do?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests your knowledge of Cloud Armor diagnostic capabilities, where candidates often confuse preview mode (testing) with verbose logging (detailed troubleshooting).
Troubleshooting overly strict Cloud Armor WAF rules requires enabling verbose logging to capture detailed request attributes and rule match reasons. Community experts confirm that setting the Cloud Armor policy log level to VERBOSE is the definitive solution for investigating blocked traffic.
Preview mode (Option C) is frequently selected because it safely tests rules, but it disables enforcement rather than providing the granular request logs needed to identify specific WAF triggers.
Community Discussion (7 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Enabling verbose logging at the Cloud Armor policy level captures comprehensive request metadata, including the exact rule ID, regex matches, and threat intelligence flags that caused a block. When paired with ALB backend logging, this creates a complete audit trail for security teams. As noted in official documentation, verbose logging is specifically designed for policy creation and troubleshooting phases.Why the Other Options Are Wrong
Preview mode (Option C) temporarily disables rule enforcement, which risks exposing vulnerable endpoints during an active incident investigation. Log sinks filtering by redirected_by_security_policy (Option D) only capture redirect events, missing the specific WAF rule evaluation details. Backend sampling rates (Option A) control traffic volume sent to backends, not WAF rule diagnostics or security logging granularity.Community Comment Notes
Multiple high-voted comments validate that verbose logging provides the necessary depth to pinpoint triggering rules without altering enforcement behavior. Users highlight that while preview mode aids testing, it fails to deliver the forensic logs required for root cause analysis. Consensus strongly aligns with Google’s recommendation to use VERBOSE logging exclusively during active troubleshooting [Comment 1, Comment 5].Official Reference
Exam Strategy
Always distinguish between testing controls (preview mode) and diagnosing controls (verbose logging). For any PCSE scenario requiring deeper visibility into security policy decisions, prioritize explicit logging configurations over behavioral toggles.
Frequently Asked Questions
Why isn't preview mode used for troubleshooting Cloud Armor rules?
Preview mode disables rule enforcement, which risks exposing your site during an active incident. It is intended for safe testing, not for collecting detailed forensic logs.
Does verbose logging impact production performance in Cloud Armor?
Yes, verbose logging generates significantly more data and may slightly increase latency. It should only be enabled temporarily during troubleshooting or policy validation.