# Cloudflare

### Prerequisites

* Cloudflare Enterprise plan
* Publicly signed CA certificate
* Follow the [OpenTelemetry receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/cloudflarereceiver#getting-started) getting started section for help configuring Cloudflare LogPush jobs.

### Supported Platforms

| Platform                                | Metrics | Logs | Traces |
| --------------------------------------- | ------- | ---- | ------ |
| Linux                                   |         | ✓    |        |
| Windows                                 |         | ✓    |        |
| macOS                                   |         | ✓    |        |
| Kubernetes Gateway                      |         | ✓    |        |
| <p>OpenShift 4 Node (DaemonSet)<br></p> |         | ✓    |        |

### Configuration Table

<table><thead><tr><th width="150.37109375">Parameter</th><th width="91.7734375">Type</th><th width="108.84765625">Default</th><th>Description</th></tr></thead><tbody><tr><td>listen_address</td><td><code>string</code></td><td>0.0.0.0</td><td>The IP address to listen on. The collector must be available on the internet in order to receive logs from Cloudflare.</td></tr><tr><td>https_port</td><td><code>int</code></td><td>8443</td><td>TCP port to receive incoming uploads from the LogPush job(s).</td></tr><tr><td>enable_tls</td><td><code>bool</code></td><td>true</td><td>Whether or not to use TLS.</td></tr><tr><td>cert_file</td><td><code>string</code></td><td></td><td>A TLS certificate used to encrypt communications on the listening server. Cloudflare requires that this certificate be signed by a public certificate authority. If TLS is enabled.</td></tr><tr><td>key_file</td><td><code>string</code></td><td></td><td>A TLS private key used to encrypt communications on the listening server. Cloudflare requires TLS. If TLS is enabled.</td></tr><tr><td>mutual_tls</td><td><code>bool</code></td><td>false</td><td>Whether of not to use Mutual TLS</td></tr><tr><td>ca_file</td><td><code>string</code></td><td></td><td>Certificate authority used to validate the OTLP server's TLS certificate. If Mutual TLS is enabled.</td></tr><tr><td>secret</td><td><code>string</code></td><td></td><td>String used to validate that messages are coming from an expected source. If set, it must be also be configured in the LogPush job's destination field: <code>"destination_conf": "https://example.com?header_X-CF-Secret=abcd1234"</code></td></tr><tr><td>attributes</td><td><code>map</code></td><td></td><td>Any Cloudflare LogPush field names provided as keys will be mapped to attributes using the map value as the attribute name.</td></tr><tr><td>timestamp_field</td><td><code>string</code></td><td>EdgeStartTimestamp</td><td>The name of the field that should be parsed to represent the Timestamp of the log record.</td></tr></tbody></table>

## Kubernetes <a href="#kubernetes" id="kubernetes"></a>

When using this source with Kubernetes or OpenShift, you must create a custom Service resource to route traffic to the collector. See the Kubernetes [Service](https://docs.bindplane.com/deployment/kubernetes/collector/custom-service) for more information.

### External Documentation

* [Cloudflare LogPush documentation](https://developers.cloudflare.com/logs/about/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/cloudflare.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
