Prompt
How do I get WAF logs and alerts for blocked attacks?
Latest observation
Nov 16, 2026
OpenAI APIWeb search: off
To get WAF logs and alerts for blocked attacks, you generally need to do two things:
- Enable WAF logging
- Send those logs/metrics to an alerting system
The exact steps depend on the WAF you’re using, but here’s the common pattern.
What to look for in the logs
Blocked requests usually show fields like:
action = BLOCK/deny/blocked- rule ID / policy ID
- client IP
- requested URI
- timestamp
- country / ASN
- matched signature / reason
Common setup options
If you use a cloud WAF
Examples: AWS WAF, Azure WAF, Cloudflare, Google Cloud Armor
- Turn on WAF logging
- Send logs to:
- storage (S3 / Blob / Log bucket)
- log analytics (CloudWatch / Log Analytics / BigQuery)
- SIEM (Splunk, Sentinel, Datadog, etc.)
- Create alerts for:
- any
BLOCKaction - spikes in blocked requests
- specific rule IDs
- repeated blocks from one IP
- any
If you use a reverse proxy / app gateway WAF
Examples: ModSecurity, NGINX App Protect, F5, Imperva
- Enable audit/security logs
- Forward logs to your centralized logging platform
- Build alert rules on:
- blocked events
- high-volume attacks
- critical rule matches
Typical alert logic
Good alert conditions include:
- More than N blocked requests in X minutes
- Same IP blocked repeatedly
- Blocks against a login or admin endpoint
- Blocks from new geographies
- Blocks matching high-severity rules
Example alert query idea
If your logs are in a SIEM, search for something like:
action:block OR action:blocked OR waf_action:BLOCK
Then alert when count exceeds a threshold over a time window.
Best practice
Don’t alert on every single block unless traffic is low. WAFs can block a lot of benign noise. Better to alert on:
- patterns
- bursts
- critical signatures
- targeted endpoints
If you tell me your WAF
I can give you exact steps for:
- AWS WAF
- Azure WAF
- Cloudflare WAF
- Google Cloud Armor
- ModSecurity
- another specific product
If you want, I can also show you how to set up AWS WAF blocked-request alerts in CloudWatch/SNS or a SIEM query for your logs.