Cloudflare Logs
Send logs to Last9 from Cloudflare for CDN monitoring and worker monitoring via Logpush
Introduction
This document lists step-by-step instructions for pushing logs from Cloudflare to Last9.
Prerequisites
- Create a Last9 account by following Getting Started.
- Keep the following information handy from the Integrations page:
$last9_otlp_endpoint
: Last9's OTLP endpoint copies from Cloudflare Integration section from Integrations page.$last9_basic_auth_header
: OTLP Basic authorization header
Setup
You can use Cloudflare's Logpush Custom HTTPS endpoint integration to push logs from Cloudflare to Last9. Logpush delivers logs in batches as quickly as possible, with no minimum batch size, potentially delivering files more than once per minute. This capability enables Cloudflare to provide information almost in real time, in smaller file sizes.
Logpush does not offer storage or search functionality for logs; its primary aim is to send logs as quickly as they arrive which makes it perfect candidate to send logs to Last9 Log Management.
Via Cloudflare dashboard
-
In Select a destination, choose HTTP destination.
-
Enter the HTTP endpoint as the Last9 Endpoint, and select Continue.
https://$last9_otlp_endpoint/cloudflare?header_Authorization=<encoded($last9_basic_auth_header)>
-
Select the dataset to push to the storage service.
-
In the next step, you need to configure your logpush job:
- Enter the Job name as Last9.
- Under If logs match, you can select the events to include and/or remove from your logs. Refer to Filters for more information. Not all datasets have this option available.
- In Send the following fields, you can choose to either push all logs to Last9 or selectively choose which logs you want to push.
-
In Advanced Options:
- Choose the format of timestamp fields in your logs to be
UnixNano
.
- Choose the format of timestamp fields in your logs to be
-
Select Submit once you are done configuring your logpush job.
Via API
To create a Logpush job, make a POST
request to the Logpush job creation endpoint URL with the appropriate parameters.