Setting up the Cloudflare Logpush integration

Setting up Log File Analysis with Cloudflare Logpush (opens in a new tab) in ContentKing is very straightforward! Follow the steps outlined below to enable Log File Analysis in ContentKing, and set up the Logpush integration.

Cloudflare Logpush is available exclusively on Cloudflare's Enterprise plan.

If your Cloudflare account is not on the Enterprise plan, you can integrate with Cloudflare with the Cloudflare Worker instead.

Setting up the Log File Analysis

The process of configuring the Log File Analysis consists of two phases:

  1. Enabling the Log File Analysis feature and creating an AWS S3 bucket (opens in a new tab) in ContentKing

  2. Configuring Logpush in the Cloudflare UI

1. Enabling the Log File Analysis feature and creating an AWS S3 bucket in ContentKing

If you navigate to Account and then Websites section in ContentKing, you can easily filter and see which of the websites you are monitoring in ContentKing are on Cloudflare:

Screenshot of the website section in ContentKing

From there, just follow the steps outlined below to enable Log File Analysis on the wanted website:

  1. Click any website that is running on Cloudflare in the Websites section (opens in a new tab) of ContentKing
  2. Click on Log File Analysis tab in settings
  3. Move the Log File Analysis toggle to Enabled state

After this is done, follow the next steps to create an AWS S3 bucket in ContentKing:

  1. In the same Log File Analysis section, checkmark Cloudflare Logpush as the delivery method
  2. Click on How to install link next to Cloudflare Logpush
  3. Specify in which region should the AWS S3 bucket be created (EU or US) and click on Create bucket
  4. After this, ContentKing will automatically generate the AWS credentials and the AWS S3 bucket
  5. Save the credentials as they will be used to associate the AWS S3 bucket with the Cloudflare Logpush service in the next section

2. Configuring Cloudflare Logpush

Cloudflare Logpush needs to be manually configured in the Cloudflare UI for every website. The configuration of Logpush consists of the following steps:

1. Go to the "Logs" section in the Cloudflare UI

Log in to your Cloudflare account, choose the website for which you want to enable the Log File Analysis feature, and click on "Analytics" –> "Logs"

Screenshot of the Logs view in the Cloudflare UI
2. Click the Connect a service button

In the Logpush section, click on Connect a service button

Screenshot of the Connect a service section in Cloudflare UI
3. Select the Data Set

In the Select Data Set step select HTTP requests as the data set

Screenshot of the Select data set in the Cloudflare account
3. Select Data Fields

Select the following Data Fields that need to be provided in the HTTP request log. All required Data Fileds are preselected by default, apart from the following two that need to be specified manually:

  • ClientRequestScheme (in the ClientRequest category)
  • ClientRequestUserAgent (in the ClientRequest category)
Screenshot illustrating which Data Fields should be selected in Cloudflare account

The ones that are preselected are the following Data Fields:

  • Client IP
  • ClientRequestHost
  • ClientRequestMethod
  • ClientRequestURI
  • EdgeEndTimestamp
Screenshot illustrating which Data Fields should be selected in Cloudflare account

After ensuring that the required Data Fields are selected, click Next

4. Select Amazon S3

Select Amazon S3 as the destination and click Next

Screenshot illustrating selecting Amazon S3 as a destination
5. Enter Destination Info

Enter the "Bucket path" and the "Bucket region" generated in ContentKing to the corresponding fields in the "Enter destination information" step

Screenshot illustrating destination information
Screenshot illustrating destination information

The default selection should be kept for all other options.

Once done, click Validate access

Screenshot illustrating validating access
6. Validate access to the the S3 bucket

After initiating access validation, Cloudflare sends a file to ContentKing's specified S3 bucket that contains the Ownership token.

Validate access to the S3 bucket by copy-pasting the Ownership token from ContentKing to Cloudflare:

  • Navigate back to ContentKing, click Next if you haven't already, and copy the Ownership token to your clipboard:
Screenshot showing the example of the Ownership Token in ContentKing
  • After that, navigate back to the Cloudflare UI and paste the Ownership token to the corresponding field:
Screenshot showing where to paste the Ownership token in the Cloudflare UI
  • Click on Push. After that, you should see the Logpush service that you have just created in the overview
Screenshot showing the overview in the Cloudflare UI

Reinstalling Cloudflare Logpush

If you want to change the AWS S3 bucket region or reinstall Cloudflare Logpush, you can do it in the following way:

  1. Click on the website on which you want to reinstall Cloudflare Logpush in the Websites section (opens in a new tab) of ContentKing
  2. Click on Log File Analysis in Settings, and then on the reinstall link next to the Cloudflare Logpush delivery method in the Log Sources
  3. If needed change the region, and click on Create bucket
  4. Configure Cloudflare Logpush following the steps above

Disabling Log File Analysis

Same as with enabling Log File Analysis, you need to disable the feature in ContentKing and then remove the Cloudflare Logpush service in the Cloudflare UI.

Disabling Log File Analysis

  1. Click on the website on which you want to disable Log File Analysis in the Websites section (opens in a new tab) of ContentKing
  2. Click on the Log File Analysis in the Settings section
  3. Move the Log File Analysis toggle to Disabled state

Once this is done, ContentKing will automatically disable Cloudflare Logpush access to the AWS S3 bucket.

Removing Cloudflare Logpush

If you have disabled the Log File Analysis feature, you still need to remove the Cloudflare Logpush service in your Cloudflare account.

This needs to be done manually, as ContentKing doesn't have access to your Cloudflare account.

For the most common security-related questions about ContentKing's Log File Analysis, refer to the FAQ section in the Log File Analysis support article

Need help?

In case you have any questions regarding the Cloudflare Logpush integration that are not covered by our documentation, don’t hesitate to contact us!