> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/listeners/listener-integrations/collect-data-from-cloudflare.md).

# Collect data from Cloudflare

{% hint style="info" %}
See the changelog of the **Cloudflare** Listener [here](/listeners-changelog/cloudflare-listener.md).
{% endhint %}

{% hint style="warning" %}
The **Cloudflare** Listener is only available in certain Tenants. [Get in touch with us](https://supportportal.crowdstrike.com/s/get-help) if you don't see it and want to access it.
{% endhint %}

## Overview

Onum supports integration with [Cloudflare](https://www.cloudflare.com/).

Cloudflare is a global cloud connectivity and cybersecurity company that acts as a secure reverse proxy between a website and its visitors. It protects, accelerates, and improves the reliability of websites, APIs, and corporate networks by routing internet traffic through its vast global network.

## Prerequisites

[https://supportportal.crowdstrike.com/s/get-help](https://supportportal.crowdstrike.com/s/get-help "mention") to get the required JWT token, which will be needed on the Listener setup.

You can also contact us if you cannot generate the required TLS certificates. Note that these certificates must be signed by a recognized Certificate Authority (CA). Self-signed certificates are not accepted.

## Cloudflare Setup

Cloudflare Logpush supports the ability to send logs to configurable HTTP endpoints. Follow [these instructions](https://developers.cloudflare.com/logs/logpush/logpush-job/enable-destinations/http/) to enable log sending before starting the configuration in Onum.

## Onum Setup

{% stepper %}
{% step %}
Log in to your Onum tenant and click **Listeners > New listener**.
{% endstep %}

{% step %}
Double-click the **Cloudflare** Listener.
{% endstep %}

{% step %}
Enter a **Name** for the new Listener. Optionally, add a **Description** and some **Tags** to identify the Listener.
{% endstep %}

{% step %}
In the **Socket** section, enter the required **Port**. The port can be found in your Cloudflare dashboard under the **Network** tab. For custom applications, check your Cloudflare for Teams configuration under **Access >** **Applications** or **Gateway** > **Policies** for socket endpoints.
{% endstep %}

{% step %}
In the **Authentication** section, you must enter your Cloudflare token. To find your Cloudflare authentication token:

* Log in to the Cloudflare dashboard
* Click on your profile icon in the top-right corner
* Select **My Profile** from the dropdown menu
* Navigate to the **API Tokens** tab and either:
  * Use an existing token (view its permissions to ensure it has appropriate access)
  * Create a new token by clicking **Create Token**
  * Use the **Global API Key** (found under **API Keys** section) for full account access

Remember that tokens are only displayed once at creation time, so copy and store them securely.
{% endstep %}

{% step %}
Open the **Select token** field and click **New secret** to create a new one:

* Give the token a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the secret corresponding to the Cloudflare token you received.
* Click **Save**.

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/settings/organization-settings/secrets-management.md).
{% endhint %}
{% endstep %}

{% step %}
You can now select the secret you just created in the **Token Secret** field.
{% endstep %}

{% step %}
In the **TLS configuration** section, enter the required certificates (**Certificate**, **Private key** and **CA chain**).

{% hint style="warning" %}
Certificates must be signed by a recognized Certificate Authority (CA). Self-signed certificates are not accepted.
{% endhint %}
{% endstep %}

{% step %}
Finally, click **Create labels**. Optionally, you can set labels to be used for internal Onum routing of data. By default, data will be set as **Unlabeled**.

{% hint style="info" %}
Learn more about labels in [this article](/listeners/labels.md).
{% endhint %}
{% endstep %}

{% step %}
Click **Create listener** when you're done.
{% endstep %}
{% endstepper %}

## Output Ports <a href="#ports" id="ports"></a>

The **Cloudflare** Listener has only a single output port:

* **Default port** - Events are sent through this port if no error occurs while processing them.
* **Error port** - Events are sent through this port if an error occurs while processing them.
