Send Cloudflare logs to LogPulse
Cloudflare HTTP request logs, firewall events, audit logs, Zero Trust, DNS and healthchecks through the API, and Workers and Pages logs and traces through OTLP push.
Configure → Sources → Cloud. LogPulse reads the Cloudflare API and OTLP push itself, without an agent. Events land in the web, dns, firewall, audit, iam, network, application, cicd indexes with source cloudflare, cloudflare_workers, cloudflare_pages and fill the Application Logs, Security Event, Trace Event, CI/CD Pipeline, Observability Alert data models.Overview
- Cloudflare API and OTLP push to Integration poller
- Integration poller to index=web
- Integration poller to index=dns
- Integration poller to index=firewall
- Integration poller to index=audit
- Integration poller to index=iam
- Integration poller to index=network
- Integration poller to index=application
- Integration poller to index=cicd
LogPulse signs in to Cloudflare with the credential you give it and fetches new events every five minutes by default. You can set the interval per integration, from one minute to 24 hours.
What you need
- OTLP push: no Cloudflare credentials needed, only Cloudflare Observability pointed at LogPulse
- API polling: a Cloudflare API Token with read permission for the data sources you turn on
- API polling: the Account ID (in the dashboard sidebar)
- Optional: a Zone ID for the zone-level data sources (HTTP logs, firewall, DNS, healthchecks)
- In LogPulse: a role that may manage API keys. Cloud integrations fall under that right.
1. Create a credential in Cloudflare
| Field in LogPulse | Where you find it |
|---|---|
| Cloudflare API Token | Only for API polling. In the Cloudflare dashboard: My Profile, API Tokens. Give it read permission for the data sources you turn on, such as Account Audit Logs: Read. Stored encrypted and never shown again. |
| Account ID | Only for API polling. In the Cloudflare dashboard sidebar under your account name. |
| Zone ID (optional) | Needed for HTTP request logs, firewall events, DNS logs and healthchecks. On the overview page of the zone. |
2. Add the integration in LogPulse
Go to Configure → Sources → Cloud and choose Cloudflare. Fill in the fields, tick the data sources you want and save. LogPulse first tests the connection with your credential and tells you what is wrong when it fails.
Workers & Pages Logs and Workers & Pages Traces are not polled but sent to LogPulse by Cloudflare. After you save, LogPulse shows the address and the key to set on the Cloudflare side.
What arrives
| Data source | Index | Source | Sourcetype | What it holds |
|---|---|---|---|---|
| HTTP Request Logs | web | cloudflare | cloudflare:http | Edge HTTP request logs with RayID tracing: client info, cache status, origin timing, WAF actions, and Worker subrequests. |
| DNS Query Logs (off by default) | dns | cloudflare | cloudflare:dns | DNS query analytics: query name, type, response code, and resolver latency. |
| Firewall / WAF Events | firewall | cloudflare | security_event | Web Application Firewall events: blocked requests, challenges, bot detections, and rate limit triggers. |
| Account Audit Logs | audit | cloudflare | security_event | Account-level audit trail: user logins, setting changes, API token usage, and zone modifications. |
| Zero Trust Access Logs (off by default) | iam | cloudflare | security_event | Zero Trust Access authentication events: user access decisions, identity provider logins, and policy evaluations. |
| Zero Trust Gateway Logs (off by default) | network | cloudflare | security_event | Zero Trust Gateway activity: HTTP filtering, DNS filtering, network session logs, and DLP detections. |
| Workers & Pages Logs | application | cloudflare_workers | cloudflare:workers:log | Application logs from Cloudflare Workers and Pages via OTLP push. console.log output, exceptions, and custom log events streamed in real-time. |
| Workers & Pages Traces | application | cloudflare_workers | observability_trace | Cloudflare Workers and Pages execution traces: invocation timing, subrequests, KV/D1 operations, and errors. Received via OTLP push from Cloudflare Observability. |
| Pages Deployments (off by default) | cicd | cloudflare_pages | cicd_pipeline | Cloudflare Pages deployment events: build status, deployment stages, environment, and commit info. |
| Healthcheck Events (off by default) | application | cloudflare | observability_alert | Origin health monitoring: healthcheck status changes, latency measurements, and failure reasons. |
The index is the kind of data and the source is the product, so detection rules for that kind of data find Cloudflare without changes.
Fields and data models
| Data model | What you get |
|---|---|
| Application Logs | Workers and Pages application logs pushed in real time over OTLP: console output, exceptions and custom events. |
| Security Event | Firewall and WAF events, audit logs, Zero Trust Access and Gateway logs with standard security fields. |
| Trace Event | Workers and Pages execution traces and OTLP spans with service name, duration, status and error details. |
| CI/CD Pipeline | Pages deployments with build status, stages, git trigger and environment. |
| Observability Alert | Healthcheck status changes with origin address, failure reasons and check regions. |
Events are mapped to the data models above, with the same field names as other sources of the same kind. See field names.
3. Check the data
The first events arrive within a few minutes. Check what came in:
earliest=-1h index IN (web, dns, firewall, audit, iam, network, application, cicd) source IN (cloudflare, cloudflare_workers, cloudflare_pages)
| stats count by index, source, sourcetypeThe integration page in LogPulse shows when it last read events and the last error, if any.
Troubleshooting
The connection test names what is wrong. These are the answers you are most likely to see.
| What you see | What to do |
|---|---|
| API Token is invalid, expired, or revoked. | Create a new token at Cloudflare Dashboard, My Profile, API Tokens. |
| Token lacks "Account Audit Logs: Read" permission. Add this permission to the API token. | Edit the token and add the read permission for each data source you turned on. |
| Zone not found or not accessible. | Copy the Zone ID from the overview page of the zone, and include that zone in the resources of the token. |
| The test passes but no events arrive. | Run the search above over a longer time. No results: check on the integration page that the data source is switched on and when it last read events. Cloudflare may also simply have had nothing new. |
Frequently asked questions
- How do I send Cloudflare logs to LogPulse?
- Add the Cloudflare cloud integration under Configure, Sources, Cloud in LogPulse and fill in Cloudflare API Token, Account ID. LogPulse reads the Cloudflare API and OTLP push itself, every five minutes by default; there is nothing to install.
- Which permissions does LogPulse need in Cloudflare?
- OTLP push: no Cloudflare credentials needed, only Cloudflare Observability pointed at LogPulse. API polling: a Cloudflare API Token with read permission for the data sources you turn on. API polling: the Account ID (in the dashboard sidebar). Optional: a Zone ID for the zone-level data sources (HTTP logs, firewall, DNS, healthchecks). Read access is enough for collecting logs.
- Which index does Cloudflare data go to?
- The index is the kind of data: web, dns, firewall, audit, iam, network, application, cicd. The source is the product: cloudflare, cloudflare_workers, cloudflare_pages. Each data source has its own sourcetype, listed on this page.
- Which data models does Cloudflare fill?
- Application Logs, Security Event, Trace Event, CI/CD Pipeline, Observability Alert. Detection rules and dashboards written for a data model work on Cloudflare without changes.
- Why is a data source off by default?
- To keep your daily ingest down until you need it: DNS Query Logs, Zero Trust Access Logs, Zero Trust Gateway Logs, Pages Deployments, Healthcheck Events are high volume or of use to fewer teams. Tick the data source in the integration to switch it on.
- Do I need a Cloudflare API token for Workers logs?
- No. Workers and Pages logs and traces are pushed by Cloudflare over OTLP with an API key that LogPulse generates. The API token is only for the polled data sources such as HTTP request logs and firewall events.