Prompt
How do I get logs and alerts from a WAF for blocked attacks and incidents?
Latest observation
Nov 4, 2026
OpenAI APIWeb search: off
To get logs and alerts from a WAF for blocked attacks and incidents, you generally need to do three things:
- Enable WAF logging
- Send logs to a central system
- Create alert rules for suspicious or blocked events
1) Enable WAF logging
Most WAFs can log:
- Blocked requests
- Allowed requests that matched a rule
- Rule ID / policy that triggered
- Client IP, URL, method, headers
- Attack category like SQLi, XSS, bots, protocol violations
Look for settings such as:
- Security events
- Attack logs
- WAF audit logs
- Threat logs
- Detection mode / prevention mode
- Verbose logging
If your WAF has different modes, make sure you are in blocking/prevention mode if you want to see blocked attacks, not just detections.
2) Forward logs to a log platform
Send WAF logs to a central place where you can search and alert, such as:
- SIEM: Splunk, QRadar, Microsoft Sentinel, Elastic Security
- Log platform: CloudWatch, Azure Log Analytics, Google Cloud Logging
- Security tools: Chronicle, Datadog Security, Sumo Logic
- Syslog / SIEM forwarder
- Webhook / event stream if supported
Common methods:
- Syslog
- API export
- Native cloud integration
- Agent-based log shipping
- Message bus / event streaming
3) Build alert rules
Create alerts for events like:
- Any blocked request
- Spike in blocked requests
- Repeated blocks from same IP
- Same source hitting multiple URLs
- High confidence attack signatures
- Critical rule matches
- Blocked requests against login, admin, payment endpoints
- Geo/IP reputation hits
- Bot or credential-stuffing indicators
Useful alert patterns:
- Threshold-based
- Example: more than 20 blocked requests from one IP in 5 minutes
- Rate anomaly
- Example: blocked traffic suddenly 10x normal baseline
- Severity-based
- Example: alert only on high/critical WAF events
- Correlation-based
- Example: WAF block + repeated auth failures + same user agent
Example alert logic
If your log platform supports queries, you might alert on fields such as:
action = blockedseverity >= mediumrule_category in ("SQLi", "XSS", "RCE")src_ip count > thresholduri contains "/login"or"/admin"
What to verify
Make sure your WAF logs include:
- Timestamp
- Source IP
- Destination host/app
- Request URI and method
- Action taken: allowed/blocked/challenged
- Rule or signature ID
- Attack type / label
- Request ID / transaction ID
- User agent / referrer if available
Recommended incident workflow
- WAF detects and blocks attack
- Event is logged with details
- Log is forwarded to SIEM
- SIEM correlates with other signals
- Alert is sent to email, Slack, Teams, PagerDuty, etc.
- Analyst reviews and confirms whether it’s malicious
- If needed, add temporary block rules or tune false positives
If you tell me your WAF vendor
I can give you exact steps for a specific platform, such as:
- Cloudflare
- AWS WAF
- Azure WAF
- F5
- Imperva
- Akamai
- Fortinet
- ModSecurity / NGINX / Apache
If you want, I can also show you:
- how to set up AWS WAF logging and alerts
- how to do it in Cloudflare
- or how to build SIEM alerts for WAF blocked attacks.