Cloudflare Logpull Connector Setup Guide

The Cloudflare Logpull Connector allows you to stream logs containing crucial data about the connecting client, request paths through the Cloudflare network, and responses from the origin web server. This guide outlines the prerequisites, how to retrieve them, and the necessary configurations to set up the connector.


Prerequisites

Before proceeding with the setup, ensure you have the following:

  • Super Administrator Role: Only a user with this role can complete the setup.
  • Cloudflare Login Email: This is the email used to access Cloudflare, where the zone and API are created.
  • Zone ID: The unique identifier of the website or application added to Cloudflare.
  • Cloudflare API Token: This token must have the appropriate permissions to pull logs.

Steps to Retrieve Prerequisites

Follow the steps below to gather the required details from Cloudflare:

  1. Log in to Cloudflare:
    • Use your Cloudflare account to access the Cloudflare Dashboard.
    • Note down your email.
  2. Get the Zone ID:
    • Open the website or application for which you want to pull logs from the dashboard.
    • Copy the Zone ID from the page.

  3. Generate Cloudflare API Token:
    • Navigate to the API token section by clicking "Get your API token."
    • Select Create Token.
    • Choose the Read Analytics and Logs template by clicking Use Template.

  • Adjust the permissions as needed or use the default settings.

  • (Optional) Define the token's TTL (Time to Live), which determines how long it will stay active.

 

  • Continue by clicking Continue to Summary and then Create Token.
  • Copy the generated API token.


Cloudflare Connector Configuration

After collecting all prerequisites, follow these steps to configure the Cloudflare Logpull Connector in DNIF:

Field

Description

Connector Name

Enter a suitable name for the connector.

Auth Email

Enter the Cloudflare login email.

Cloudflare API Token

Paste the Cloudflare API token generated earlier.

Cloudflare Zone ID

Enter the Zone ID(s). You can input multiple Zone IDs, separated by commas (,).


Configuration Steps

  1. Save the Details:
    • Once you have entered all required fields, click Save.
  2. Test the Connection:
    • A Connection successful message will appear with a timestamp if the configuration is correct.
  3. Troubleshoot if Necessary: