Try it free

Cloudflare extension

  • Latest Dynatrace
  • Extension

Monitor Cloudflare edge network performance with HTTP traffic, DNS analytics, Workers metrics, firewall events, and notification history.

Get started

Overview

The Cloudflare platform is built to improve the security, performance, and reliability of systems connected to the internet, primarily by serving as a reverse proxy for your web traffic. Your traffic flows through Cloudflare, where rules and optimizations are applied to meet its goals. Because of its position, Cloudflare has great visibility into your traffic and web performance.

Through the Cloudflare extension, Dynatrace can collect this information and make it available in Dynatrace for use monitoring and analytics purposes in context with the rest of your Dynatrace information.

Use cases

The Dynatrace Cloudflare extension queries various APIs to collect notification history and various metrics from your Cloudflare accounts for ingestion into Dynatrace.

  • Ingest metrics for use in context with Dynatrace information:
    • HTTP traffic
    • DNS analytics
    • Worker activity and performance
  • View notification history within Dynatrace for events detected in Cloudflare such as DDoS attacks

Requirements

  • Dynatrace environment and ActiveGate version 1.269+
  • A paid Cloudflare account. To access 1-minute granularity data for HTTP-traffic, a paid Cloudflare account is required, as this information is not available over API for free accounts.
  • Access to Cloudflare API and a token with required permissions. Metrics and events are pulled from the Cloudflare API.

Activation and setup

Find Cloudflare in the in-product Extensions or Hub page and activate (if offline, you can download the extension from this Hub page in the Release notes section and install as you would a custom extension).

Monitoring configurations

Once the extension is activated in your environment, you can create monitoring configurations. Each monitoring configuration can have one or more Cloudflare account.

  1. Select the ActiveGate group that will run the monitoring configuration.

    • API Token

      • The API token must have been issued from a member with at least the Minimal Account Access and Analytics account scoped roles (see Account > Members > Account Scoped Roles).
      • The API token requires the Read permission on the Account.Account Settings, Account.Account Analytics, and Zone.Analytics permissions for the desired accounts.
    • Accounts

      Note: Multiple accounts can be monitored in one monitoring configuration, but they must share an API token for access

      • Account ID
      • Zone filters
        Provide zones you would like to collect data for either by name or tag/ID. If no zones are provided, all will attempt to be collected.
    • Notification retrieval frequency

      Frequency that notifications will be retrieved from Cloudflare and reported. Set to 0 to disable. Applies to all configured accounts.

  2. Review the available feature sets to determine which you want to enable and collect. The enabled feature sets will effect which APIs are called.

  3. Review the list of feature sets to see which metrics are collected depending on the enabled feature sets.

  4. Notification history: If enabled, a log event will be ingested for each notification event that shows up within your notification history.

Details

Licensing and costs

There is no charge to use the extension. You are only charged for the data that the extension ingests.

The Cloudflare extension ingests custom metrics, which consume Davis Data Units (DDUs) (Dynatrace classic license) or Metrics powered by Grail (DPS), according to your license model.

License consumption is based on the number of metric data points ingested per minute by feature set. Note that many of these depend on the nature of the traffic being received by Cloudflare and so may change significantly over time.

DNS Analytics

(1 * <dnsQueryLocation> * <dnsQueryResponseCode>)

HTTP Traffic

6 + (1 * <sslProtocolVersion>) + (1 * <edgeResponseContentType>) + (4 * <clientCountryName>) + (1 * <edgeResponseStatus>) + (1 * <threatPathingName>)

Workers

15 * <scriptName> * <status> * <usageModel> * <environmentName>

Log records are ingested for notifications in the notification history of monitored Cloudflare accounts.

Dynatrace Platform Subscription

In the Dynatrace Platform Subscription, metric ingestion consumes Metrics powered by Grail according to the number of ingested metric data points.

To calculate the approximate yearly consumption, apply the following calculation: <metric data points per minute> * 60 minutes * 24 hours * 365 days.

For logs, regular consumption applies. See Log Management and Analytics.

Dynatrace classic license

In the classic licensing model, metric ingestion consumes Davis Data Units (DDUs) at the rate of .001 DDUs per metric data point. Multiply the above formula for annual data points by .001 to estimate annual DDU usage.

For logs, regular DDU consumption applies. See DDU consumption for Log Management and Analytics or DDUs for Log Monitoring Classic.

The DDU cost above does not include any possible log events or custom events that are triggered by the extension. For more information, see DDU events.

Feature sets

When activating your extension using a monitoring configuration, you can limit monitoring to one of the feature sets. To work properly, the extension has to collect at least one metric after the activation.

In highly segmented networks, feature sets can reflect the segments of your environment. Then, when you create a monitoring configuration, you can select a feature set and a corresponding ActiveGate group that can connect to this particular segment.

All metrics that aren't categorized into any feature set are considered to be the default and are always reported.

A metric inherits the feature set of a subgroup, which in turn inherits the feature set of a group. Also, the feature set defined on the metric level overrides the feature set defined on the subgroup level, which in turn overrides the feature set defined on the group level.

default
Metric nameMetric keyDescription
Number of Cloudflare notificationscloudflare.notificationsThe number of notifications that have been pulled from Cloudflare
http-traffic
Metric nameMetric keyDescription
Total requestscloudflare.http.total_requestsTotal requests in this zone
Cached requestscloudflare.http.cached_requestsRequests satisfied by the cache
Bytescloudflare.http.bytesTotal bytes returned to the client
Cached bytescloudflare.http.cached_bytesBytes returned to client from cache
Encrypted bytescloudflare.http.encrypted_bytesBytes returned to client using SSL/TLS protocol
Threatscloudflare.http.threatsRequests classified as threats
Requests by SSL protocolcloudflare.http.requests_by_ssl_protocolRequests broken down by SSL protocol version
Requests by content typecloudflare.http.requests_by_content_typeRequests broken down by retuend content type
Bytes by countrycloudflare.http.bytes_by_countryBytes returned to client broken down by country
Requests by countrycloudflare.http.requests_by_countryRequests broken down by country
Threats by countrycloudflare.http.threats_by_countryRequests classified as threats broken down by country
Threats by pathing namecloudflare.http.threats_by_pathing_nameRequests classified as requests broken down by threat type
workers
Metric nameMetric keyDescription
Worker requestscloudflare.workers.requestsTotal worker requests
Worker subrequestscloudflare.workers.subrequestsTotal worker subrequests
Worker errorscloudflare.workers.errorsTotal worker errors
Worker durationcloudflare.workers.durationWorker duration
Worker duration 50th percentilecloudflare.workers.duration_p50Worker duration 50th percentile
Worker duration 99th percentilecloudflare.workers.duration_p99Worker duration 99th percentile
Worker wall timecloudflare.workers.wall_timeWorker wall time
Worker wall time 50th percentilecloudflare.workers.wall_time_p50Worker wall time 50th percentile
Worker wall time 99th percentilecloudflare.workers.wall_time_p99Worker wall time 99th percentile
Worker CPU time 50th percentilecloudflare.workers.cpu_time_p50Worker CPU time 50th percentile
Worker CPU time 99th percentilecloudflare.workers.cpu_time_p99Worker CPU time 99th percentile
dns-analytics
Metric nameMetric keyDescription
DNS query countcloudflare.dns.queriesTotal DNS queries

FAQ

  • Why do some of the metrics appear delayed?

    Testing has shown that some APIs that have the minute-level data show up reliably only after several minutes. To avoid missing or partial data being reported, we query these types of metrics with a 5-minute delay.

Hub

Explore in Dynatrace Hub

Monitor Cloudflare edge network performance with HTTP traffic, DNS analytics, Workers metrics, firewall events, and notification history.

Related tags
NetworkPythonCDNCloudflareInfrastructure Observability