-
Notifications
You must be signed in to change notification settings - Fork 599
[Cloudflare]: update documentation #3228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,76 @@ | ||
| # Cloudflare Integration | ||
|
|
||
| The Cloudflare integration collects events from the Cloudflare API. | ||
| Users of [Cloudflare](https://www.cloudflare.com/en-au/learning/what-is-cloudflare/) use Cloudflare services for the purposes of increasing security and performance of their web sites and services. | ||
|
|
||
| Cloudflare integration uses [Cloudflare's API](https://api.cloudflare.com/) to retrieve Audit events and network traffic logs from Cloudflare and ingest them into Elasticsearch. This allows you to search, observe and visualize the Cloudflare log events through Elasticsearch. | ||
|
|
||
| The Elastic agent running this integration interacts with the Cloudflare infrastructure using Cloudflare APIs to retrieve [audit logs](https://support.cloudflare.com/hc/en-us/articles/115002833612-Understanding-Cloudflare-Audit-Logs) and [traffic logs](https://developers.cloudflare.com/logs/logpull/understanding-the-basics/) for a particular zone. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Enabling the integration in Elastic | ||
|
|
||
| 1. In Kibana go to **Management > Integrations** | ||
| 2. In "Search for integrations" search bar type **Cloudflare** | ||
| 3. Click on "Cloudflare" integration from the search results. | ||
| 4. Click on **Add Cloudflare** button to add Cloudflare integration. | ||
|
|
||
| ### Configure Cloudflare audit logs data stream | ||
|
|
||
| Enter values "Auth Email", "Auth Key" and "Account ID". | ||
|
|
||
| 1. **Auth Email** is the email address associated with your account. | ||
| 2. [**Auth Key**](https://developers.cloudflare.com/api/keys/) is the API key generated on the "My Account" page. | ||
| 3. **Account ID** can be found on Cloudflare dashboard. Follow the navigation documentation from [here](https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/find-account-and-zone-ids/) | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| NOTE: Look for `X-AUTH-EMAIL` and `X-AUTH-KEY` [here](https://api.cloudflare.com/#getting-started-requests) for more information on Auth Email and Auth Key. | ||
|
|
||
| ### Configure Cloudflare logs | ||
|
|
||
| These logs contain data related to the connecting client, the request path through the Cloudflare network, and the response from the origin web server. For more information look [here](https://developers.cloudflare.com/logs/logpull/). | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| The integration can retrieve Cloudflare logs using - | ||
|
|
||
| 1. Auth Email and Auth Key | ||
| 2. API Token | ||
|
|
||
| More information is available [here](https://developers.cloudflare.com/logs/logpull/requesting-logs/#required-authentication-headers) | ||
|
|
||
| #### Configure using Auth Email and Auth Key | ||
|
|
||
| Enter values "Auth Email", "Auth Key" and "Zone ID". | ||
|
|
||
| 1. **Auth Email** is the email address associated with your account. | ||
| 2. [**Auth Key**](https://developers.cloudflare.com/api/keys/) is the API key generated on the "My Account" page. | ||
| 3. **Zone ID** can be found [here](https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/find-account-and-zone-ids/) | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| NOTE: Look for `X-AUTH-EMAIL` and `X-AUTH-KEY` [here](https://api.cloudflare.com/#getting-started-requests) for more information on Auth Email and Auth Key. | ||
|
|
||
| #### Configure using API Token | ||
|
|
||
| Enter values "API Token" and "Zone ID". | ||
|
|
||
| For the Cloudflare integration to be able to successfully get logs the following permissions must be granted to the API token - | ||
|
|
||
| - Account.Access: Audit Logs: Read | ||
|
|
||
| 1. [**API Tokens**](https://developers.cloudflare.com/api/tokens/) allow for more granular permission settings. | ||
| 2. **Zone ID** can be found [here](https://developers.cloudflare.com/fundamentals/get-started/basic-tasks/find-account-and-zone-ids/) | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Logs | ||
|
|
||
| ### Audit | ||
|
|
||
| The Cloudflare Audit records all events related to your Cloudflare account. | ||
| To use this integration, you must have the `Account.Access: Audit Logs: Read` permission and you must use your email and your Global API Key (not an API Token). | ||
| Audit logs summarize the history of changes made within your Cloudflare account. Audit logs include account level actions like login and logout, as well as setting changes to DNS, Crypto, Firewall, Speed, Caching, Page Rules, Network, and Traffic features, etc. | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| {{fields "audit"}} | ||
|
|
||
| {{event "audit"}} | ||
|
|
||
| ### Logpull | ||
|
|
||
| The Cloudflare Logpull records network events related to your organization in order to provide an audit trail that can be used to understand platform activity and to diagnose problems. This module is implemented using the httpjson input. | ||
| These logs contain data related to the connecting client, the request path through the Cloudflare network, and the response from the origin web server. For more information look [here](https://developers.cloudflare.com/logs/logpull/). | ||
|
efd6 marked this conversation as resolved.
Outdated
|
||
|
|
||
| {{fields "logpull"}} | ||
|
|
||
| {{event "logpull"}} | ||
| {{event "logpull"}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.