diff --git a/src/content/docs/dns/additional-options/analytics.mdx b/src/content/docs/dns/additional-options/analytics.mdx index b4e189adf501113..04133b6ec879856 100644 --- a/src/content/docs/dns/additional-options/analytics.mdx +++ b/src/content/docs/dns/additional-options/analytics.mdx @@ -6,7 +6,7 @@ sidebar: --- -import { FeatureTable } from "~/components" +import { FeatureTable, Details } from "~/components" When you use Cloudflare DNS, you can access data about DNS queries through a variety of sources. @@ -18,6 +18,8 @@ DNS analytics allow you to evaluate data about DNS queries to your zone. You can [use the dashboard](#view-on-the-dashboard) to get insights quickly based on a [predefined set of dimensions](#available-dimensions), or [use the API](#explore-with-the-api) to have access to all fields available in the GraphQL DNS analytics schemas. +When using GraphQL, you also have the option to get data for DNS queries across all zones within a given Cloudflare account. + ### Availability and limits @@ -66,10 +68,60 @@ The DNS analytics has two [schemas](/analytics/graphql-api/getting-started/query * `dnsAnalyticsAdaptive`: Retrieve information about individual DNS queries. * `dnsAnalyticsAdaptiveGroups`: Get reports on aggregate information only. +To get account-level data, you can set up queries similar to the following: + +
+ +```graphql graphql-api-explorer +query GetLastNXDOMAINResponses { + viewer { + accounts(filter: { accountTag: "83a4527361bcdec24566fd7f837b6de5" }) { + dnsAnalyticsAdaptive( + limit: 10000 + filter: { + date_geq: "2025-06-16", + responseCode: "NXDOMAIN", + date_leq: "2025-06-18" + } + orderBy: [datetime_DESC] + ) { + zoneTag + queryName + responseCode + queryType + datetime + } + } + } +} +``` +
+ +
+ +```graphql graphql-api-explorer +query GetTotalDNSQueryCount { + viewer { + accounts(filter: { accountTag: "83a4527361bcdec24566fd7f837b6de5" }) { + dnsAnalyticsAdaptiveGroups( + filter: { + date_geq: "2025-05-01" + date_leq: "2025-05-30" + } + limit: 1 + ) { + count + } + } + } +} +``` +
+ --- ## Logs Logs let Enterprise customers view [detailed information](/logs/reference/log-fields/zone/dns_logs/) about individual DNS queries. -For help setting up Logpush, refer to [Get started with Logs](/logs/get-started/). +For help setting up Logpush, refer to [Get started with Logs](/logs/get-started/). \ No newline at end of file diff --git a/src/content/plans/index.json b/src/content/plans/index.json index 88625b1526cc47d..281511d0c403660 100644 --- a/src/content/plans/index.json +++ b/src/content/plans/index.json @@ -690,20 +690,35 @@ "biz": "Yes", "ent": "Yes" }, - "maximum_duration": { - "title": "Maximum time interval", + "maximum_duration_zone": { + "title": "Maximum time interval (zone)", "free": "7 days", "pro": "31 days", "biz": "31 days", "ent": "62 days" }, - "historical_data": { - "title": "Historical data", + "maximum_duration_account": { + "title": "Maximum time interval (account)", + "free": "7 days", + "pro": "7 days", + "biz": "7 days", + "ent": "62 days" + }, + "historical_data_zone": { + "title": "Historical data (zone)", "free": "8 days", "pro": "31 days", "biz": "31 days", "ent": "62 days" + }, + "historical_data_account": { + "title": "Historical data (account)", + "free": "8 days", + "pro": "8 days", + "biz": "8 days", + "ent": "62 days" } + } }, "dnssec": {