Cloudflare Logs: Firewall Event and HTTP Request Fields Explained
Published
One JSON record per request Cloudflare's edge handled or per security event it raised: the visitor (ClientIP, ClientASN, ClientCountry, user agent), what they asked for, what the edge answered, and for security events which product acted (Source), which rule (RuleID, Description) and what it did (Action).
Official documentation: Cloudflare: Firewall events log fields · Cloudflare: HTTP requests log fields · Cloudflare: Logpush
Sample record
Numbered lines are the fields in the table.
From the LogTriage parser test corpus — synthetic data, no real hosts or users.
Field reference
| Field | Type | Meaning | Why it matters for security |
|---|---|---|---|
| 1ClientIPe.g. 185.220.101.34 | IP address | Cloudflare: "The IP address of the visitor (IPv4 or IPv6)." | The real visitor, since Cloudflare is the first hop; your origin sees Cloudflare's addresses unless it reads CF-Connecting-IP. |
| 2ClientASNe.g. 209854 | number | Cloudflare: "The ASN of the visitor." | Hosting and VPN networks sending requests to login or admin paths are worth a closer look than residential ones. |
| 3ClientCountrye.g. DE | string | Cloudflare: "Country from which the request originated." | Useful for a first triage and for custom rules; never proof of who the visitor is. |
| 4ClientRequestMethode.g. POST | string | Cloudflare: "The HTTP method used by the visitor." | POST bursts to a login path are password guessing. |
| 5ClientRequestPathe.g. /api/v1/users | string | Cloudflare: "The path requested by the visitor." | Probe paths and traversal sequences show up here. |
| 6ClientRequestQuerye.g. id=1 UNION SELECT username,password FROM users-- | string | Cloudflare: "The query string requested by the visitor." | Injection payloads are usually here, not in the path. |
| 7ClientRequestUserAgente.g. sqlmap/1.7.8#stable (https://sqlmap.org) | string | Cloudflare: "The user-agent string of the visitor." | Attack tools announce themselves; the same tool behind many ClientIPs is one campaign. |
| 8EdgeResponseStatuse.g. 403 | number | Cloudflare: "HTTP response status code returned to the browser." | 403 with Action block means the edge stopped it; a 200 with Action log means the rule only watched. |
| 9Actione.g. block | string | Cloudflare: "The code of the first-class action the Cloudflare Firewall took on this request" — allow, block, challenge, managedchallenge, log and others. | log is not protection — a rule in log mode that matches attacks is a rule to switch to block. |
| 10Sourcee.g. waf | string | Cloudflare: "The Cloudflare security product triggered by this request" — waf, firewallcustom, ratelimit, securitylevel, botfight and others. | Tells you which product to tune: a WAF managed rule, one of your custom rules, a rate limit. |
| 11RuleIDe.g. 100514 | string | Cloudflare: "The Cloudflare security product-specific RuleID triggered by this request." | Group events by rule to see which attacks are hitting you most and which rules produce noise. |
| 12Descriptione.g. SQLi attack detected | string | Cloudflare: "The description of the rule triggered by this request." | Human-readable rule name for reports; filter on RuleID. |
| 13Datetimee.g. 2024-03-15T05:00:01Z | date-time | Cloudflare: "The date and time the event occurred at the edge." The format depends on the Logpush job's timestamp setting (RFC 3339, Unix seconds or nanoseconds). | Check the job's format before parsing; Unix nanoseconds are a common default. |
Have one of your own records? Paste it into the log line explainer and each field is explained from this table, with times, codes and addresses decoded — in your browser.
What it records
Cloudflare sits in front of the origin, so its logs describe every visitor before anything reaches your servers. Two Logpush datasets matter for security. Security events (firewall_events) has one record per request a security product acted on or logged: the visitor (ClientIP, ClientASN, ClientCountry, ClientRequestUserAgent), the request (ClientRequestMethod, ClientRequestPath, ClientRequestQuery), the product (Source), the rule (RuleID, Description) and what it did (Action). HTTP requests has one record for every request, with many more client, edge and origin fields but no rule detail.
The malicious sample shows SQL injection from sqlmap blocked by WAF rules, path traversal blocked, a Go client blocked from /api/v1/admin/users by a custom rule, a login endpoint hitting a rate limit, and two attacks that a rule only logged (Action log) — those reached the origin.
Where to get it
- Logpush. A job per dataset, delivering newline-delimited JSON to cloud storage or a SIEM; choose the fields and the timestamp format in the job.
- Dashboard. Security → Events lists and filters recent security events, with export.
- GraphQL Analytics API. Queries recent events programmatically.
# Blocked or logged events per client address and rule, from a Logpush file of security events
jq -r 'select(.Action=="block" or .Action=="log") | [.ClientIP, .Source, .RuleID, .Description] | @tsv' events.json | sort | uniq -c | sort -rn | head
Parsing pitfalls
- Configurable fields. A Logpush job chooses its fields; records may lack ones another job includes. Do not require fields beyond the few you need.
- Timestamp formats.
Datetimeand the HTTP dataset’sEdgeStartTimestampare RFC 3339, Unix seconds or Unix nanoseconds depending on the job. - Empty strings. Allowed requests carry empty
RuleID,DescriptionandSourcerather than omitting them. - Two datasets, overlapping names. Security events and HTTP requests share client fields but differ elsewhere; tag records with their dataset when mixing them.
Detection ideas
- Attacks that got through:
Actionlog on WAF rules for injection or traversal — the request reached your origin; check its response there. - Reconnaissance: traversal and probe paths from one
ClientIPorClientASN— the Cloudflare path traversal rule. - Password guessing:
ratelimitevents on login paths, and the sameClientIPin HTTP requests with many 401s. - Tool fingerprints:
ClientRequestUserAgentvalues such assqlmapor default HTTP libraries across many addresses.
The free browser analyzer reads Cloudflare security event and HTTP request exports and runs these checks locally.
Sending Cloudflare Logs to an LLM
One megabyte of this format is about 536,614 tokens on current Claude models and 296,943 on GPT models, measured with the models' own tokenizers — so a gigabyte sent raw to Claude Sonnet 5.5 costs about $1,073 in input tokens alone (prices of 2026-10-24). Estimate your own volume →
Detections and guides for Cloudflare Logs
Frequently Asked Questions
- Why does my origin server log Cloudflare's IP addresses instead of visitors?
- Behind Cloudflare, every connection to your origin comes from Cloudflare's network. The visitor's address is in ClientIP in Cloudflare's logs and in the CF-Connecting-IP header Cloudflare adds to the request. Configure the web server to trust that header from Cloudflare's published ranges, or join on time and path with Cloudflare's logs.
- What is the difference between Action log and block?
- block stops the request at the edge and returns an error page; log records that a rule matched but lets the request through to your origin. A managed rule set left in log mode still shows every attack it saw, but none of them were stopped — check EdgeResponseStatus and your origin logs for what the request did.
- Which Cloudflare dataset should I export for security?
- Security events (the firewall_events dataset) contain only requests a security product acted on or logged, with Action, Source, RuleID and Description. HTTP requests contain every request, with client, request and response fields but no rule detail. Investigations usually need both: security events to find the attack, HTTP requests to see what else the same ClientIP did.
- How do I get Cloudflare logs?
- Logpush sends datasets continuously to storage such as Amazon S3, Google Cloud Storage or Azure Blob, or to a SIEM. Security events can also be viewed and filtered in the dashboard and queried through the GraphQL Analytics API for recent periods. Plans differ in which datasets and destinations are available.
Analyze a Cloudflare Logs file in your browser
The free analyzer detects this format, parses every field above and flags attack patterns — the file never leaves your machine. For threat-intel enrichment and an AI-written incident report, run it through LogTriage.
Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing
How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]