diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c44719cf..1c79a6b0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,6 +8,7 @@ plugins/* @squaredup/community-moderators # Request review from original author plugins/AutoTask/* @TimWheeler-SQUP +plugins/Cloudflare/* @clarkd plugins/DattoRMM/* @TimWheeler-SQUP plugins/DigiCert/* @shaswot77 plugins/Huntress/* @Deenk diff --git a/plugins/Cloudflare/v2/configValidation.json b/plugins/Cloudflare/v2/configValidation.json new file mode 100644 index 00000000..c3f20c76 --- /dev/null +++ b/plugins/Cloudflare/v2/configValidation.json @@ -0,0 +1,31 @@ +{ + "steps": [ + { + "displayName": "Authenticate", + "dataStream": { "name": "verifyToken" }, + "required": true, + "error": "Could not authenticate with Cloudflare. Check the API token is valid, has not expired, and has not been revoked.", + "success": "Connected to Cloudflare successfully." + }, + { + "displayName": "Check account access", + "dataStream": { + "name": "accounts", + "config": { "errorOnEmptyResults": true } + }, + "required": false, + "error": "Authenticated, but no accounts are visible. Add the Account Settings Read permission and set Account Resources to Include all accounts.", + "success": "Accounts accessible." + }, + { + "displayName": "Check zone access", + "dataStream": { + "name": "zones", + "config": { "errorOnEmptyResults": true } + }, + "required": false, + "error": "Authenticated, but no zones are visible. Add the Zone Read permission and set Zone Resources to Include all zones.", + "success": "Zones accessible." + } + ] +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-access-application-to-zone.json b/plugins/Cloudflare/v2/correlationRules/relate-access-application-to-zone.json new file mode 100644 index 00000000..9fd82783 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-access-application-to-zone.json @@ -0,0 +1,21 @@ +{ + "displayName": "Access Application protects Zone", + "source": { + "types": "Cloudflare Access Application" + }, + "target": { + "types": "Cloudflare Zone" + }, + "conditions": [ + { + "sourceProperty": "domain", + "sourceExpression": "{{ value.split('.').slice(-2).join('.') }}", + "operator": "equals", + "targetProperty": "name" + } + ], + "labels": { + "forward": "protects", + "reverse": "protected by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-durable-object-namespace-to-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-durable-object-namespace-to-worker.json new file mode 100644 index 00000000..bd276682 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-durable-object-namespace-to-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Durable Object Namespace defined by Worker", + "source": { + "types": "Cloudflare Durable Object Namespace" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "scriptName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "defined by", + "reverse": "defines" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-pages-project-to-zone.json b/plugins/Cloudflare/v2/correlationRules/relate-pages-project-to-zone.json new file mode 100644 index 00000000..5ca1cf7f --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-pages-project-to-zone.json @@ -0,0 +1,20 @@ +{ + "displayName": "Pages Project served by Zone", + "source": { + "types": "Cloudflare Pages Project" + }, + "target": { + "types": "Cloudflare Zone" + }, + "conditions": [ + { + "sourceProperty": "primaryDomain", + "operator": "equals", + "targetProperty": "name" + } + ], + "labels": { + "forward": "served by", + "reverse": "serves" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-queue-to-producer-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-queue-to-producer-worker.json new file mode 100644 index 00000000..0abb0d75 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-queue-to-producer-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Queue receives messages from Worker", + "source": { + "types": "Cloudflare Queue" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "primaryProducerScript", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "receives messages from", + "reverse": "sends messages to" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-queue-to-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-queue-to-worker.json new file mode 100644 index 00000000..69913763 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-queue-to-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Queue consumed by Worker", + "source": { + "types": "Cloudflare Queue" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "primaryConsumerScript", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "consumed by", + "reverse": "consumes" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-resources-to-account.json b/plugins/Cloudflare/v2/correlationRules/relate-resources-to-account.json new file mode 100644 index 00000000..ac9ee9c6 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-resources-to-account.json @@ -0,0 +1,41 @@ +{ + "displayName": "Account contains Resource", + "source": { + "types": [ + "Cloudflare Zone", + "Cloudflare Worker", + "Cloudflare R2 Bucket", + "Cloudflare Pages Project", + "Cloudflare D1 Database", + "Cloudflare KV Namespace", + "Cloudflare Queue", + "Cloudflare Tunnel", + "Cloudflare Load Balancer Pool", + "Cloudflare Access Application", + "Cloudflare Durable Object Namespace", + "Cloudflare Vectorize Index", + "Cloudflare Hyperdrive Config", + "Cloudflare Stream Video", + "Cloudflare Turnstile Widget", + "Cloudflare AI Gateway", + "Cloudflare AutoRAG", + "Cloudflare Container Application", + "Cloudflare Pipeline", + "Cloudflare Realtime App" + ] + }, + "target": { + "types": "Cloudflare Account" + }, + "conditions": [ + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "belongs to", + "reverse": "contains" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-turnstile-widget-to-zone.json b/plugins/Cloudflare/v2/correlationRules/relate-turnstile-widget-to-zone.json new file mode 100644 index 00000000..2740cb18 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-turnstile-widget-to-zone.json @@ -0,0 +1,20 @@ +{ + "displayName": "Turnstile Widget protects Zone", + "source": { + "types": "Cloudflare Turnstile Widget" + }, + "target": { + "types": "Cloudflare Zone" + }, + "conditions": [ + { + "sourceProperty": "primaryDomain", + "operator": "equals", + "targetProperty": "name" + } + ], + "labels": { + "forward": "protects", + "reverse": "protected by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-d1-database.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-d1-database.json new file mode 100644 index 00000000..d09c627a --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-d1-database.json @@ -0,0 +1,20 @@ +{ + "displayName": "Worker Binding targets D1 Database", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare D1 Database" + }, + "conditions": [ + { + "sourceProperty": "d1DatabaseId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-durable-object-namespace.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-durable-object-namespace.json new file mode 100644 index 00000000..83819497 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-durable-object-namespace.json @@ -0,0 +1,20 @@ +{ + "displayName": "Worker Binding targets Durable Object Namespace", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Durable Object Namespace" + }, + "conditions": [ + { + "sourceProperty": "durableObjectNamespaceId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-hyperdrive-config.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-hyperdrive-config.json new file mode 100644 index 00000000..cf21944d --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-hyperdrive-config.json @@ -0,0 +1,20 @@ +{ + "displayName": "Worker Binding targets Hyperdrive Config", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Hyperdrive Config" + }, + "conditions": [ + { + "sourceProperty": "hyperdriveConfigId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-kv-namespace.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-kv-namespace.json new file mode 100644 index 00000000..350e95a1 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-kv-namespace.json @@ -0,0 +1,20 @@ +{ + "displayName": "Worker Binding targets KV Namespace", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare KV Namespace" + }, + "conditions": [ + { + "sourceProperty": "kvNamespaceId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-queue.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-queue.json new file mode 100644 index 00000000..eb6fc7e5 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-queue.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Binding targets Queue", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Queue" + }, + "conditions": [ + { + "sourceProperty": "queueName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-r2-bucket.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-r2-bucket.json new file mode 100644 index 00000000..11cbcdce --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-r2-bucket.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Binding targets R2 Bucket", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare R2 Bucket" + }, + "conditions": [ + { + "sourceProperty": "r2BucketName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-service-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-service-worker.json new file mode 100644 index 00000000..755b56e9 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-service-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Binding calls Worker", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "serviceName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "calls", + "reverse": "called by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-vectorize-index.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-vectorize-index.json new file mode 100644 index 00000000..3c285d58 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-vectorize-index.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Binding targets Vectorize Index", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Vectorize Index" + }, + "conditions": [ + { + "sourceProperty": "vectorizeIndexName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "targets", + "reverse": "targeted by" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-worker.json new file mode 100644 index 00000000..d305df2a --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-binding-to-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Binding declared by Worker", + "source": { + "types": "Cloudflare Worker Binding" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "scriptName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "declared by", + "reverse": "declares" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-worker.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-worker.json new file mode 100644 index 00000000..00a77911 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-worker.json @@ -0,0 +1,25 @@ +{ + "displayName": "Worker Route handled by Worker", + "source": { + "types": "Cloudflare Worker Route" + }, + "target": { + "types": "Cloudflare Worker" + }, + "conditions": [ + { + "sourceProperty": "scriptName", + "operator": "equals", + "targetProperty": "name" + }, + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ], + "labels": { + "forward": "handled by", + "reverse": "handles" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-zone.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-zone.json new file mode 100644 index 00000000..85ba711c --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-route-to-zone.json @@ -0,0 +1,20 @@ +{ + "displayName": "Worker Route on Zone", + "source": { + "types": "Cloudflare Worker Route" + }, + "target": { + "types": "Cloudflare Zone" + }, + "conditions": [ + { + "sourceProperty": "zoneId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "routes traffic on", + "reverse": "has route" + } +} diff --git a/plugins/Cloudflare/v2/correlationRules/relate-worker-to-zone.json b/plugins/Cloudflare/v2/correlationRules/relate-worker-to-zone.json new file mode 100644 index 00000000..1ae58f92 --- /dev/null +++ b/plugins/Cloudflare/v2/correlationRules/relate-worker-to-zone.json @@ -0,0 +1,37 @@ +{ + "displayName": "Worker serves Zone", + "source": { + "types": "Cloudflare Worker" + }, + "bridge": { + "types": "Cloudflare Worker Route" + }, + "target": { + "types": "Cloudflare Zone" + }, + "sourceConditions": [ + { + "sourceProperty": "name", + "operator": "equals", + "targetProperty": "scriptName" + } + ], + "targetConditions": [ + { + "sourceProperty": "zoneId", + "operator": "equals", + "targetProperty": "rawId" + } + ], + "labels": { + "forward": "serves", + "reverse": "served by" + }, + "conditions": [ + { + "sourceProperty": "accountId", + "operator": "equals", + "targetProperty": "accountId" + } + ] +} diff --git a/plugins/Cloudflare/v2/custom_types.json b/plugins/Cloudflare/v2/custom_types.json new file mode 100644 index 00000000..d6411e94 --- /dev/null +++ b/plugins/Cloudflare/v2/custom_types.json @@ -0,0 +1,163 @@ +[ + { + "name": "Cloudflare Account", + "sourceType": "Cloudflare Account", + "icon": "building", + "singular": "Account", + "plural": "Accounts" + }, + { + "name": "Cloudflare Zone", + "sourceType": "Cloudflare Zone", + "icon": "globe", + "singular": "Zone", + "plural": "Zones" + }, + { + "name": "Cloudflare Worker", + "sourceType": "Cloudflare Worker", + "icon": "bolt", + "singular": "Worker", + "plural": "Workers" + }, + { + "name": "Cloudflare R2 Bucket", + "sourceType": "Cloudflare R2 Bucket", + "icon": "bucket", + "singular": "R2 Bucket", + "plural": "R2 Buckets" + }, + { + "name": "Cloudflare Pages Project", + "sourceType": "Cloudflare Pages Project", + "icon": "file-code", + "singular": "Pages Project", + "plural": "Pages Projects" + }, + { + "name": "Cloudflare D1 Database", + "sourceType": "Cloudflare D1 Database", + "icon": "database", + "singular": "D1 Database", + "plural": "D1 Databases" + }, + { + "name": "Cloudflare KV Namespace", + "sourceType": "Cloudflare KV Namespace", + "icon": "key", + "singular": "KV Namespace", + "plural": "KV Namespaces" + }, + { + "name": "Cloudflare Queue", + "sourceType": "Cloudflare Queue", + "icon": "layer-group", + "singular": "Queue", + "plural": "Queues" + }, + { + "name": "Cloudflare Tunnel", + "sourceType": "Cloudflare Tunnel", + "icon": "road-lock", + "singular": "Tunnel", + "plural": "Tunnels" + }, + { + "name": "Cloudflare Load Balancer Pool", + "sourceType": "Cloudflare Load Balancer Pool", + "icon": "scale-balanced", + "singular": "Load Balancer Pool", + "plural": "Load Balancer Pools" + }, + { + "name": "Cloudflare Access Application", + "sourceType": "Cloudflare Access Application", + "icon": "shield-halved", + "singular": "Access Application", + "plural": "Access Applications" + }, + { + "name": "Cloudflare Durable Object Namespace", + "sourceType": "Cloudflare Durable Object Namespace", + "icon": "cubes", + "singular": "Durable Object Namespace", + "plural": "Durable Object Namespaces" + }, + { + "name": "Cloudflare Vectorize Index", + "sourceType": "Cloudflare Vectorize Index", + "icon": "vector-square", + "singular": "Vectorize Index", + "plural": "Vectorize Indexes" + }, + { + "name": "Cloudflare Hyperdrive Config", + "sourceType": "Cloudflare Hyperdrive Config", + "icon": "gauge-high", + "singular": "Hyperdrive Config", + "plural": "Hyperdrive Configs" + }, + { + "name": "Cloudflare Worker Route", + "sourceType": "Cloudflare Worker Route", + "icon": "route", + "singular": "Worker Route", + "plural": "Worker Routes" + }, + { + "name": "Cloudflare Worker Binding", + "sourceType": "Cloudflare Worker Binding", + "icon": "plug", + "singular": "Worker Binding", + "plural": "Worker Bindings" + }, + { + "name": "Cloudflare Stream Video", + "sourceType": "Cloudflare Stream Video", + "icon": "video", + "singular": "Stream Video", + "plural": "Stream Videos" + }, + { + "name": "Cloudflare Turnstile Widget", + "sourceType": "Cloudflare Turnstile Widget", + "icon": "shield-check", + "singular": "Turnstile Widget", + "plural": "Turnstile Widgets" + }, + { + "name": "Cloudflare AI Gateway", + "sourceType": "Cloudflare AI Gateway", + "icon": "brain", + "singular": "AI Gateway", + "plural": "AI Gateways" + }, + { + "name": "Cloudflare AutoRAG", + "sourceType": "Cloudflare AutoRAG", + "icon": "magnifying-glass", + "singular": "AutoRAG", + "plural": "AutoRAGs" + }, + { + "name": "Cloudflare Container Application", + "sourceType": "Cloudflare Container Application", + "icon": "box", + "singular": "Container Application", + "plural": "Container Applications" + }, + { + "name": "Cloudflare Pipeline", + "sourceType": "Cloudflare Pipeline", + "icon": "diagram-project", + "singular": "Pipeline", + "plural": "Pipelines" + }, + { + "name": "Cloudflare Realtime App", + "sourceType": "Cloudflare Realtime App", + "icon": "phone", + "singular": "Realtime App", + "plural": "Realtime Apps" + } +] diff --git a/plugins/Cloudflare/v2/dataStreams/accessApps.json b/plugins/Cloudflare/v2/dataStreams/accessApps.json new file mode 100644 index 00000000..d56f7acc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/accessApps.json @@ -0,0 +1,85 @@ +{ + "name": "accessApps", + "displayName": "Access Applications", + "description": "Zero Trust Access applications protected in a Cloudflare account", + "tags": [ + "Security" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/access/apps", + "postRequestScript": "accessApps.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "appName", + "displayName": "Application", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Access Application" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "domain", + "displayName": "Domain", + "shape": "string" + }, + { + "name": "appType", + "displayName": "Type", + "shape": "string" + }, + { + "name": "sessionDuration", + "displayName": "Session Duration", + "shape": "string" + }, + { + "name": "appLauncherVisible", + "displayName": "In App Launcher", + "shape": "boolean" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Updated", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/accessLogins.json b/plugins/Cloudflare/v2/dataStreams/accessLogins.json new file mode 100644 index 00000000..4d192d74 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/accessLogins.json @@ -0,0 +1,70 @@ +{ + "name": "accessLogins", + "displayName": "Access Logins", + "description": "Daily Zero Trust login attempts for an Access application by identity provider, country and outcome", + "tags": ["Security", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$appId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){accessLoginRequestsAdaptiveGroups(limit:10000,filter:{appId:$appId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count dimensions{date identityProvider isSuccessfulLogin country hasWarpEnabled}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "appId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.accessLoginRequestsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Access Application"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.identityProvider", + "displayName": "Identity Provider", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.isSuccessfulLogin", + "displayName": "Successful", + "shape": "boolean" + }, + { + "name": "dimensions.country", + "displayName": "Country", + "shape": "string" + }, + { + "name": "dimensions.hasWarpEnabled", + "displayName": "WARP Enabled", + "shape": "boolean" + }, + { + "name": "count", + "displayName": "Logins", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/accounts.json b/plugins/Cloudflare/v2/dataStreams/accounts.json new file mode 100644 index 00000000..09d63775 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/accounts.json @@ -0,0 +1,81 @@ +{ + "name": "accounts", + "displayName": "Accounts", + "description": "Cloudflare accounts the API token can access", + "tags": [ + "Account" + ], + "baseDataSourceName": "httpRequestUnscoped", + "config": { + "httpMethod": "get", + "endpointPath": "accounts", + "pathToData": "result", + "expandInnerObjects": true, + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "50" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": "none", + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "id", + "displayName": "Account ID", + "shape": "string", + "role": "id" + }, + { + "name": "name", + "displayName": "Account", + "shape": "string", + "role": "label", + "sourceId": "id", + "sourceType": "Cloudflare Account" + }, + { + "name": "type", + "displayName": "Account Type", + "shape": "string" + }, + { + "name": "created_on", + "displayName": "Created", + "shape": "date" + }, + { + "name": "settings.abuse_contact_email", + "displayName": "Abuse Contact", + "shape": "string" + }, + { + "name": "settings.enforce_twofactor", + "displayName": "Enforce Two-Factor", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGatewayCache.json b/plugins/Cloudflare/v2/dataStreams/aiGatewayCache.json new file mode 100644 index 00000000..75f5d853 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayCache.json @@ -0,0 +1,57 @@ +{ + "name": "aiGatewayCache", + "displayName": "AI Gateway Cache", + "description": "Cache hit and miss counts for an AI Gateway", + "tags": ["AI", "Cache"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$gateway:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayCacheAdaptiveGroups(limit:10000,filter:{gateway:$gateway,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count dimensions{date cacheOp}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.aiGatewayCacheAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare AI Gateway"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { "name": "dimensions.cacheOp", "visible": false }, + { + "name": "cacheStatus", + "displayName": "Cache Status", + "computed": true, + "valueExpression": "{{ $['dimensions.cacheOp'] == 1 ? 'Hit' : 'Miss' }}", + "shape": "string" + }, + { + "name": "count", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json b/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json new file mode 100644 index 00000000..4934fa39 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json @@ -0,0 +1,71 @@ +{ + "name": "aiGatewayErrors", + "displayName": "AI Gateway Errors", + "description": "Error counts for an AI Gateway broken down by model or provider", + "tags": ["AI"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$gateway:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayErrorsAdaptiveGroups(limit:10000,filter:{gateway:$gateway,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.aiGatewayErrorsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare AI Gateway"] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "model", + "options": [ + { "value": "model", "label": "Model" }, + { "value": "provider", "label": "Provider" } + ] + } + ], + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { "name": "dimensions.model", "visible": false }, + { "name": "dimensions.provider", "visible": false }, + { + "name": "breakdown", + "displayName": "Breakdown", + "computed": true, + "valueExpression": "{{ $['dimensions.model'] || $['dimensions.provider'] || 'Unknown' }}", + "shape": "string" + }, + { + "name": "count", + "displayName": "Errors", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json b/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json new file mode 100644 index 00000000..4f03cc84 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json @@ -0,0 +1,146 @@ +{ + "name": "aiGatewayRequests", + "displayName": "AI Gateway Requests", + "description": "Request volume, token usage, cost and latency for an AI Gateway", + "tags": [ + "AI", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$gateway:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayRequestsAdaptiveGroups(limit:10000,filter:{gateway:$gateway,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}} sum{cost tokensIn tokensOut totalTokens cachedRequests erroredRequests} quantiles{durationMsP50 durationMsP95}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.aiGatewayRequestsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare AI Gateway" + ] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "model", + "options": [ + { + "value": "model", + "label": "Model" + }, + { + "value": "provider", + "label": "Provider" + }, + { + "value": "statusCode", + "label": "Status Code" + } + ] + } + ], + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.model", + "visible": false + }, + { + "name": "dimensions.provider", + "visible": false + }, + { + "name": "dimensions.statusCode", + "visible": false + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "computed": true, + "valueExpression": "{{ $['dimensions.model'] || $['dimensions.provider'] || $['dimensions.statusCode'] || 'Unknown' }}", + "shape": "string" + }, + { + "name": "count", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.cost", + "displayName": "Cost", + "shape": [ + "number", + { + "decimalPlaces": 2 + } + ] + }, + { + "name": "sum.tokensIn", + "displayName": "Tokens In", + "shape": "number" + }, + { + "name": "sum.tokensOut", + "displayName": "Tokens Out", + "shape": "number" + }, + { + "name": "sum.totalTokens", + "displayName": "Total Tokens", + "shape": "number" + }, + { + "name": "sum.cachedRequests", + "displayName": "Cached Requests", + "shape": "number" + }, + { + "name": "sum.erroredRequests", + "displayName": "Errored Requests", + "shape": "number" + }, + { + "name": "quantiles.durationMsP50", + "displayName": "Median Duration (P50)", + "shape": "milliseconds" + }, + { + "name": "quantiles.durationMsP95", + "displayName": "P95 Duration", + "shape": "milliseconds" + } + ], + "timeframes": [ + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGateways.json b/plugins/Cloudflare/v2/dataStreams/aiGateways.json new file mode 100644 index 00000000..d95751d2 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGateways.json @@ -0,0 +1,75 @@ +{ + "name": "aiGateways", + "displayName": "AI Gateways", + "description": "AI Gateway instances in an account", + "tags": [ + "AI" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/ai-gateway/gateways", + "postRequestScript": "aiGateways.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "gatewayName", + "displayName": "Gateway", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare AI Gateway" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "cacheTtl", + "displayName": "Cache TTL", + "shape": "seconds" + }, + { + "name": "rateLimitingLimit", + "displayName": "Rate Limit", + "shape": "number" + }, + { + "name": "collectLogs", + "displayName": "Collect Logs", + "shape": "boolean" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/auditLogs.json b/plugins/Cloudflare/v2/dataStreams/auditLogs.json new file mode 100644 index 00000000..ca10571e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/auditLogs.json @@ -0,0 +1,77 @@ +{ + "name": "auditLogs", + "displayName": "Audit Logs", + "description": "Audit log action counts for an account grouped by a selectable dimension", + "tags": [ + "Account", + "Security" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){auditLogsGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "auditLogs.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "actionType", + "options": [ + { "value": "actionType", "label": "Action" }, + { "value": "actorEmail", "label": "Actor" }, + { "value": "resourceType", "label": "Resource Type" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "actionCount", + "displayName": "Action Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": [ + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/autoragInstances.json b/plugins/Cloudflare/v2/dataStreams/autoragInstances.json new file mode 100644 index 00000000..7d1ce134 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/autoragInstances.json @@ -0,0 +1,70 @@ +{ + "name": "autoragInstances", + "displayName": "AutoRAG Instances", + "description": "AutoRAG retrieval-augmented generation instances in an account", + "tags": [ + "AI" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/autorag/rags", + "postRequestScript": "autoragInstances.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "ragName", + "displayName": "AutoRAG", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare AutoRAG" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "status", + "displayName": "Status", + "shape": "string" + }, + { + "name": "source", + "displayName": "Source", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/autoragQueries.json b/plugins/Cloudflare/v2/dataStreams/autoragQueries.json new file mode 100644 index 00000000..64c48693 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/autoragQueries.json @@ -0,0 +1,83 @@ +{ + "name": "autoragQueries", + "displayName": "AutoRAG Queries", + "description": "Search and AI Search query volume for an AutoRAG instance", + "tags": ["AI"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$instanceId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){aiSearchAPIAdaptiveGroups(limit:10000,filter:{instanceId:$instanceId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count sum{aiSearchCount searchCount} dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "instanceId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.aiSearchAPIAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare AutoRAG"] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "searchType", + "options": [ + { "value": "searchType", "label": "Search Type" }, + { "value": "embeddingModel", "label": "Embedding Model" }, + { "value": "isStream", "label": "Streamed" } + ] + } + ], + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { "name": "dimensions.searchType", "visible": false }, + { "name": "dimensions.embeddingModel", "visible": false }, + { "name": "dimensions.isStream", "visible": false }, + { + "name": "breakdown", + "displayName": "Breakdown", + "computed": true, + "valueExpression": "{{ $['dimensions.searchType'] || $['dimensions.embeddingModel'] || $['dimensions.isStream'] || 'Unknown' }}", + "shape": "string" + }, + { + "name": "count", + "displayName": "Search Events", + "shape": "number", + "role": "value" + }, + { + "name": "sum.aiSearchCount", + "displayName": "AI Searches", + "shape": "number" + }, + { + "name": "sum.searchCount", + "displayName": "Searches", + "shape": "number" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/browserRendering.json b/plugins/Cloudflare/v2/dataStreams/browserRendering.json new file mode 100644 index 00000000..621faf98 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/browserRendering.json @@ -0,0 +1,93 @@ +{ + "name": "browserRendering", + "displayName": "Browser Rendering", + "description": "Browser Rendering session count and duration for an account", + "tags": ["Compute", "AI"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){browserRenderingEventsAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count avg{avgConcurrentSessions} min{earliestBrowserStartTime} max{latestBrowserEndTime} dimensions{date sessionId {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "browserRendering.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Account"] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "clientLibrary", + "options": [ + { "value": "clientLibrary", "label": "Client Library" }, + { "value": "recordingMode", "label": "Recording Mode" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sessionId", + "displayName": "Session ID", + "shape": "string" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "count", + "displayName": "Events", + "shape": "number" + }, + { + "name": "durationMs", + "displayName": "Session Duration", + "shape": "milliseconds", + "role": "value" + }, + { + "name": "avgConcurrentSessions", + "displayName": "Avg Concurrent Sessions", + "shape": "number" + }, + { + "name": "startTime", + "displayName": "Session Start", + "shape": "date", + "visible": false + }, + { + "name": "endTime", + "displayName": "Session End", + "shape": "date", + "visible": false + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/cacheReserveOperations.json b/plugins/Cloudflare/v2/dataStreams/cacheReserveOperations.json new file mode 100644 index 00000000..0be8f98e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/cacheReserveOperations.json @@ -0,0 +1,62 @@ +{ + "name": "cacheReserveOperations", + "displayName": "Cache Reserve Operations", + "description": "Cache Reserve read, write and delete operation counts for a zone grouped by a selectable dimension", + "tags": ["Zone", "Cache"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){cacheReserveOperationsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requests}dimensions{datetime {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "cacheReserveOperations.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "operationClass", + "options": [ + { "value": "operationClass", "label": "Operation Type" }, + { "value": "actionStatus", "label": "Outcome" } + ] + } + ], + "metadata": [ + { + "name": "datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "operationCount", + "displayName": "Operation Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json b/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json new file mode 100644 index 00000000..ede3d9d3 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json @@ -0,0 +1,50 @@ +{ + "name": "cacheReserveStorage", + "displayName": "Cache Reserve Storage", + "description": "Stored object count and payload size held in Cache Reserve for a zone over time", + "tags": ["Zone", "Cache", "Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){cacheReserveStorageAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){max{objectCount storedBytes}dimensions{datetime}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.zones.0.cacheReserveStorageAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.storedBytes", + "displayName": "Stored Size", + "shape": "bytes", + "role": "value" + }, + { + "name": "max.objectCount", + "displayName": "Objects", + "shape": "number" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/containerApps.json b/plugins/Cloudflare/v2/dataStreams/containerApps.json new file mode 100644 index 00000000..74f4af0b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/containerApps.json @@ -0,0 +1,75 @@ +{ + "name": "containerApps", + "displayName": "Container Applications", + "description": "Container applications deployed in an account", + "tags": [ + "Compute" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/containers/applications", + "postRequestScript": "containerApps.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "appName", + "displayName": "Application", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Container Application" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "instances", + "displayName": "Instances", + "shape": "number" + }, + { + "name": "imageName", + "displayName": "Image", + "shape": "string" + }, + { + "name": "schedulingPolicy", + "displayName": "Scheduling Policy", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/containerMetrics.json b/plugins/Cloudflare/v2/dataStreams/containerMetrics.json new file mode 100644 index 00000000..1b3e715d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/containerMetrics.json @@ -0,0 +1,93 @@ +{ + "name": "containerMetrics", + "displayName": "Container Metrics", + "description": "CPU, memory, network and uptime metrics for a Cloudflare Container Application", + "tags": ["Compute"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$applicationId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){containersMetricsAdaptiveGroups(limit:10000,filter:{applicationId:$applicationId,datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count avg{cpuUtilization memory containerUptime} sum{rxBytes txBytes} dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "applicationId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "containerMetrics.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Container Application"] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "region", + "options": [ + { "value": "region", "label": "Region" }, + { "value": "location", "label": "Location" }, + { "value": "procType", "label": "Process Type" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "count", + "displayName": "Samples", + "shape": "number", + "role": "value" + }, + { + "name": "avgCpuUtilization", + "displayName": "Avg CPU Utilization", + "shape": "number" + }, + { + "name": "avgMemory", + "displayName": "Avg Memory Usage", + "shape": "number" + }, + { + "name": "avgContainerUptimeMs", + "displayName": "Avg Container Uptime", + "shape": "milliseconds" + }, + { + "name": "sumRxBytes", + "displayName": "Bytes Received", + "shape": "bytes" + }, + { + "name": "sumTxBytes", + "displayName": "Bytes Transmitted", + "shape": "bytes" + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Analytics.json b/plugins/Cloudflare/v2/dataStreams/d1Analytics.json new file mode 100644 index 00000000..797562ef --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Analytics.json @@ -0,0 +1,84 @@ +{ + "name": "d1Analytics", + "displayName": "D1 Queries", + "description": "Daily read and write query counts, rows touched and query latency for a D1 database", + "tags": ["Database", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$databaseId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){d1AnalyticsAdaptiveGroups(limit:10000,filter:{databaseId:$databaseId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){sum{readQueries writeQueries rowsRead rowsWritten queryBatchResponseBytes}quantiles{queryBatchTimeMsP50 queryBatchTimeMsP90 queryBatchTimeMsP99}dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.d1AnalyticsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare D1 Database"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.readQueries", + "displayName": "Read Queries", + "shape": "number", + "role": "value" + }, + { + "name": "sum.writeQueries", + "displayName": "Write Queries", + "shape": "number" + }, + { + "name": "sum.rowsRead", + "displayName": "Rows Read", + "shape": "number" + }, + { + "name": "sum.rowsWritten", + "displayName": "Rows Written", + "shape": "number" + }, + { + "name": "sum.queryBatchResponseBytes", + "displayName": "Response Bytes", + "shape": "bytes" + }, + { + "name": "quantiles.queryBatchTimeMsP50", + "displayName": "Query Time P50", + "shape": "milliseconds" + }, + { + "name": "quantiles.queryBatchTimeMsP90", + "displayName": "Query Time P90", + "shape": "milliseconds" + }, + { + "name": "quantiles.queryBatchTimeMsP99", + "displayName": "Query Time P99", + "shape": "milliseconds" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Databases.json b/plugins/Cloudflare/v2/dataStreams/d1Databases.json new file mode 100644 index 00000000..587476be --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Databases.json @@ -0,0 +1,75 @@ +{ + "name": "d1Databases", + "displayName": "D1 Databases", + "description": "D1 SQL databases in a Cloudflare account", + "tags": [ + "Database" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/d1/database", + "postRequestScript": "d1Databases.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "databaseName", + "displayName": "Database", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare D1 Database" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "version", + "displayName": "Version", + "shape": "string" + }, + { + "name": "numTables", + "displayName": "Tables", + "shape": "number" + }, + { + "name": "fileSize", + "displayName": "Size", + "shape": "bytes" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Queries.json b/plugins/Cloudflare/v2/dataStreams/d1Queries.json new file mode 100644 index 00000000..b15d5dd8 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Queries.json @@ -0,0 +1,94 @@ +{ + "name": "d1Queries", + "displayName": "D1 Query Insights", + "description": "Query counts, rows touched and duration for queries against a D1 database", + "tags": [ + "Database", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$databaseId:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){d1QueriesAdaptiveGroups(limit:10000,filter:{databaseId:$databaseId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){count sum{rowsRead rowsWritten rowsReturned}quantiles{queryDurationMsP50 queryDurationMsP95 queryDurationMsP99}dimensions{datetime databaseRole}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.d1QueriesAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare D1 Database" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Query Count", + "shape": "number", + "role": "value" + }, + { + "name": "sum.rowsRead", + "displayName": "Rows Read", + "shape": "number" + }, + { + "name": "sum.rowsWritten", + "displayName": "Rows Written", + "shape": "number" + }, + { + "name": "sum.rowsReturned", + "displayName": "Rows Returned", + "shape": "number" + }, + { + "name": "quantiles.queryDurationMsP50", + "displayName": "Query Duration P50", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "quantiles.queryDurationMsP95", + "displayName": "Query Duration P95", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "quantiles.queryDurationMsP99", + "displayName": "Query Duration P99", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "dimensions.databaseRole", + "displayName": "Database Role", + "shape": "string" + } + ], + "timeframes": [ + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Storage.json b/plugins/Cloudflare/v2/dataStreams/d1Storage.json new file mode 100644 index 00000000..1d63e765 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Storage.json @@ -0,0 +1,49 @@ +{ + "name": "d1Storage", + "displayName": "D1 Storage", + "description": "Daily stored size of a D1 database", + "tags": ["Database"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$databaseId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){d1StorageAdaptiveGroups(limit:10000,filter:{databaseId:$databaseId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){max{databaseSizeBytes}dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.d1StorageAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare D1 Database"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.databaseSizeBytes", + "displayName": "Database Size", + "shape": "bytes", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/dmarcReports.json b/plugins/Cloudflare/v2/dataStreams/dmarcReports.json new file mode 100644 index 00000000..264e83e1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/dmarcReports.json @@ -0,0 +1,69 @@ +{ + "name": "dmarcReports", + "displayName": "DMARC Reports", + "description": "DMARC aggregate report message counts and pass rates for a zone grouped by a selectable dimension", + "tags": ["Zone", "Email", "Security"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){dmarcReportsSourcesAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){sum{totalMatchingMessages dmarc} avg{dmarc} dimensions{date {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "dmarcReports.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "disposition", + "options": [ + { "value": "disposition", "label": "Disposition" }, + { "value": "domain", "label": "Domain" }, + { "value": "sourceOrgName", "label": "Sending Org" }, + { "value": "headerFrom", "label": "Header From" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "messageCount", + "displayName": "Message Count", + "shape": "number", + "role": "value" + }, + { + "name": "dmarcPassRate", + "displayName": "DMARC Pass Rate", + "shape": ["percent", { "asZeroToOne": true }] + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json b/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json new file mode 100644 index 00000000..d7354406 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json @@ -0,0 +1,69 @@ +{ + "name": "dnsFirewallAnalytics", + "displayName": "DNS Firewall Analytics", + "description": "DNS Firewall cluster query counts and median processing time for an account grouped by a selectable dimension", + "tags": ["Security", "DNS"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){dnsFirewallAnalyticsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count quantiles{processingTimeUsP50} dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "dnsFirewallAnalytics.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "responseCode", + "options": [ + { "value": "responseCode", "label": "Response Code" }, + { "value": "queryType", "label": "Query Type" }, + { "value": "responseReason", "label": "Response Reason" }, + { "value": "clusterName", "label": "Cluster" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queries", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "medianProcessingTimeMs", + "displayName": "Median Processing Time", + "shape": "milliseconds" + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json b/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json new file mode 100644 index 00000000..fb565df8 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json @@ -0,0 +1,110 @@ +{ + "name": "durableObjectInvocations", + "displayName": "Durable Object Invocations", + "description": "Request, error and wall time metrics for a Durable Object namespace", + "tags": ["Workers", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$namespaceId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){durableObjectsInvocationsAdaptiveGroups(limit:10000,filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requests errors responseBodySize wallTime}quantiles{wallTimeP50 wallTimeP90 wallTimeP99}dimensions{datetime status}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.durableObjectsInvocationsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Durable Object Namespace"] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.errors", + "displayName": "Errors", + "shape": "number" + }, + { + "name": "sum.responseBodySize", + "displayName": "Response Body Size", + "shape": "bytes" + }, + { + "name": "quantiles.wallTimeP50", + "displayName": "Wall Time P50 (raw)", + "shape": "number", + "visible": false + }, + { + "name": "wallTimeP50Ms", + "displayName": "Wall Time P50", + "computed": true, + "valueExpression": "{{ Number($['quantiles.wallTimeP50']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "quantiles.wallTimeP90", + "displayName": "Wall Time P90 (raw)", + "shape": "number", + "visible": false + }, + { + "name": "wallTimeP90Ms", + "displayName": "Wall Time P90", + "computed": true, + "valueExpression": "{{ Number($['quantiles.wallTimeP90']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "quantiles.wallTimeP99", + "displayName": "Wall Time P99 (raw)", + "shape": "number", + "visible": false + }, + { + "name": "wallTimeP99Ms", + "displayName": "Wall Time P99", + "computed": true, + "valueExpression": "{{ Number($['quantiles.wallTimeP99']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "dimensions.status", + "displayName": "Status", + "shape": "string" + }, + { + "name": "errorRate", + "displayName": "Error Rate", + "computed": true, + "valueExpression": "{{ Number($['sum.requests']) > 0 ? Math.round(10000 * Number($['sum.errors']) / Number($['sum.requests'])) / 100 : 0 }}", + "shape": ["percent", { "decimalPlaces": 2 }] + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectNamespaces.json b/plugins/Cloudflare/v2/dataStreams/durableObjectNamespaces.json new file mode 100644 index 00000000..1a09ec93 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectNamespaces.json @@ -0,0 +1,88 @@ +{ + "name": "durableObjectNamespaces", + "displayName": "Durable Object Namespaces", + "description": "Durable Object namespaces defined in a Cloudflare account", + "tags": [ + "Workers", + "Storage" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/workers/durable_objects/namespaces", + "postRequestScript": "durableObjectNamespaces.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "100" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "namespaceName", + "displayName": "Namespace", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Durable Object Namespace" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "scriptName", + "displayName": "Worker", + "shape": "string" + }, + { + "name": "className", + "displayName": "Class", + "shape": "string" + }, + { + "name": "usesSqlite", + "displayName": "SQLite Backed", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectStorage.json b/plugins/Cloudflare/v2/dataStreams/durableObjectStorage.json new file mode 100644 index 00000000..f8eb0f41 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectStorage.json @@ -0,0 +1,49 @@ +{ + "name": "durableObjectStorage", + "displayName": "Durable Object Storage", + "description": "Daily stored size of a Durable Object namespace's SQLite storage", + "tags": ["Workers", "Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$namespaceId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){durableObjectsSqlStorageGroups(limit:10000,filter:{namespaceId:$namespaceId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){max{storedBytes}dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.durableObjectsSqlStorageGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Durable Object Namespace"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.storedBytes", + "displayName": "Storage Size", + "shape": "bytes", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json b/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json new file mode 100644 index 00000000..5449a3e0 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json @@ -0,0 +1,59 @@ +{ + "name": "durableObjectSubrequests", + "displayName": "Durable Object Subrequests", + "description": "Outbound uncached fetch subrequest body size for a Durable Object namespace", + "tags": [ + "Workers", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$namespaceId:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){durableObjectsSubrequestsAdaptiveGroups(limit:10000,filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requestBodySizeUncached}dimensions{datetime}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.durableObjectsSubrequestsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Durable Object Namespace" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.requestBodySizeUncached", + "displayName": "Uncached Subrequest Body Size", + "shape": "bytes", + "role": "value" + } + ], + "timeframes": [ + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/emailRouting.json b/plugins/Cloudflare/v2/dataStreams/emailRouting.json new file mode 100644 index 00000000..f3a0acf2 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/emailRouting.json @@ -0,0 +1,64 @@ +{ + "name": "emailRouting", + "displayName": "Email Routing", + "description": "Email Routing message counts for a zone grouped by a selectable dimension", + "tags": ["Zone", "Email"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){emailRoutingAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "emailRouting.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "action", + "options": [ + { "value": "action", "label": "Action" }, + { "value": "status", "label": "Status" }, + { "value": "spf", "label": "SPF Result" }, + { "value": "dmarc", "label": "DMARC Result" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "messageCount", + "displayName": "Message Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/gatewayDnsQueries.json b/plugins/Cloudflare/v2/dataStreams/gatewayDnsQueries.json new file mode 100644 index 00000000..63d93def --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/gatewayDnsQueries.json @@ -0,0 +1,64 @@ +{ + "name": "gatewayDnsQueries", + "displayName": "Gateway DNS Queries", + "description": "DNS query counts for Zero Trust Gateway grouped by a selectable dimension", + "tags": ["Security", "DNS"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){gatewayResolverQueriesAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{date {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "gatewayDnsQueries.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "resolverDecision", + "options": [ + { "value": "resolverDecision", "label": "Decision" }, + { "value": "categoryNames", "label": "Category" }, + { "value": "locationName", "label": "Location" }, + { "value": "resourceRecordTypes", "label": "Query Type" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queryCount", + "displayName": "Query Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/gatewayHttpRequests.json b/plugins/Cloudflare/v2/dataStreams/gatewayHttpRequests.json new file mode 100644 index 00000000..c4aece5f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/gatewayHttpRequests.json @@ -0,0 +1,66 @@ +{ + "name": "gatewayHttpRequests", + "displayName": "Gateway HTTP Requests", + "description": "Zero Trust Gateway HTTP request counts for an account grouped by a selectable dimension", + "tags": ["Security", "Network"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){gatewayL7RequestsAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "gatewayHttpRequests.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "action", + "options": [ + { "value": "action", "label": "Action" }, + { "value": "httpHost", "label": "Host" }, + { "value": "categoryNames", "label": "Category" }, + { "value": "httpStatusCode", "label": "Status Code" }, + { "value": "email", "label": "User" }, + { "value": "deviceId", "label": "Device" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/gatewayNetworkSessions.json b/plugins/Cloudflare/v2/dataStreams/gatewayNetworkSessions.json new file mode 100644 index 00000000..557ef356 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/gatewayNetworkSessions.json @@ -0,0 +1,66 @@ +{ + "name": "gatewayNetworkSessions", + "displayName": "Gateway Network Sessions", + "description": "Zero Trust Gateway network (L4) session counts for an account grouped by a selectable dimension", + "tags": ["Security", "Network"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){gatewayL4SessionsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{date {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "gatewayNetworkSessions.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "action", + "options": [ + { "value": "action", "label": "Action" }, + { "value": "destinationIp", "label": "Destination IP" }, + { "value": "destinationPort", "label": "Destination Port" }, + { "value": "transportProtocol", "label": "Protocol" }, + { "value": "deviceId", "label": "Device" }, + { "value": "ruleId", "label": "Policy" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "sessionCount", + "displayName": "Session Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/graphqlQuery.json b/plugins/Cloudflare/v2/dataStreams/graphqlQuery.json new file mode 100644 index 00000000..a0e8c790 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/graphqlQuery.json @@ -0,0 +1,69 @@ +{ + "name": "graphqlQuery", + "displayName": "GraphQL Query", + "description": "Rows returned by a user-supplied Cloudflare GraphQL Analytics query", + "tags": [ + "Analytics" + ], + "baseDataSourceName": "httpRequestUnscoped", + "manualConfigApply": true, + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "{{query}}", + "variables": "{{ Object.assign(typeof timeframe !== 'undefined' && timeframe && timeframe.start ? { start: timeframe.start, end: timeframe.end, startDate: timeframe.start.split('T')[0], endDate: timeframe.end.split('T')[0] } : {}, typeof variables === 'string' ? JSON.parse(variables || '{}') : (variables || {})) }}" + }, + "postRequestScript": "graphqlQuery.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": "none", + "ui": [ + { + "type": "code", + "name": "query", + "label": "GraphQL query", + "language": "graphql", + "help": "A query for the Cloudflare GraphQL Analytics API. These variables are always sent and can be declared in the query: `$start` / `$end` (`Time!`, ISO 8601, the selected timeframe) and `$startDate` / `$endDate` (`Date!`, `YYYY-MM-DD`). Cloudflare's scalar names are case sensitive - `string!` is lower case, `Time!` and `Date!` are not. Each analytics node has its own maximum query window and retention (as little as 1 day on some nodes), which is why only short timeframes are offered - for a longer or fixed window, select the **None** timeframe and write the dates into the query's own filter. See the [Cloudflare GraphQL Analytics docs](https://developers.cloudflare.com/analytics/graphql-api/).", + "defaultValue": "query ($start: Time!, $end: Time!) {\n viewer {\n zones(limit: 1) {\n httpRequests1hGroups(\n limit: 1000\n filter: { datetime_geq: $start, datetime_leq: $end }\n orderBy: [datetime_ASC]\n ) {\n dimensions {\n datetime\n }\n sum {\n requests\n bytes\n cachedRequests\n threats\n }\n uniq {\n uniques\n }\n }\n }\n }\n}", + "validation": { + "required": true + } + }, + { + "type": "code", + "name": "variables", + "label": "Variables", + "language": "json", + "help": "Extra GraphQL variables as a JSON object, for example `{ \"zoneTag\": \"\" }` or `{ \"accountTag\": \"\" }`. These are merged with the built-in `start`, `end`, `startDate` and `endDate` variables; a value set here of the same name wins.", + "defaultValue": {} + }, + { + "type": "text", + "name": "pathToData", + "label": "Path to rows", + "placeholder": "data.viewer.zones.0.httpRequests1hGroups", + "help": "Dot path to the array of rows in the query response, for example `data.viewer.zones.0.httpRequests1hGroups`. Nested fields in each row become dot-notation columns such as `sum.requests`. If the path is wrong, the error lists the array paths the response actually contains.", + "defaultValue": "data.viewer.zones.0.httpRequests1hGroups", + "validation": { + "required": true + } + } + ], + "metadata": [ + { + "pattern": ".*" + } + ], + "supportsNoneTimeframe": true, + "timeframes": [ + "none", + "last1hour", + "last12hours", + "last24hours" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/hyperdriveConfigs.json b/plugins/Cloudflare/v2/dataStreams/hyperdriveConfigs.json new file mode 100644 index 00000000..4f77d86f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/hyperdriveConfigs.json @@ -0,0 +1,48 @@ +{ + "name": "hyperdriveConfigs", + "displayName": "Hyperdrive Configs", + "description": "Hyperdrive database connection configurations in a Cloudflare account", + "tags": ["Database"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/hyperdrive/configs", + "postRequestScript": "hyperdriveConfigs.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "visibility": { "type": "hidden" }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "configName", + "displayName": "Config", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Hyperdrive Config" + }, + { "name": "accountId", "displayName": "Account ID", "shape": "string" }, + { "name": "database", "displayName": "Database", "shape": "string" }, + { "name": "host", "displayName": "Host", "shape": "string" }, + { "name": "scheme", "displayName": "Scheme", "shape": "string" }, + { + "name": "cachingDisabled", + "displayName": "Caching Disabled", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json b/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json new file mode 100644 index 00000000..b145e172 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json @@ -0,0 +1,54 @@ +{ + "name": "hyperdriveQueries", + "displayName": "Hyperdrive Queries", + "description": "Daily query count and query latency for a Hyperdrive config", + "tags": ["Database", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$configId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){hyperdriveQueriesAdaptiveGroups(limit:10000,filter:{configId:$configId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count avg{queryLatency} dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "configId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.hyperdriveQueriesAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Hyperdrive Config"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "avg.queryLatency", + "displayName": "Avg Query Latency", + "shape": "milliseconds" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/imagesRequests.json b/plugins/Cloudflare/v2/dataStreams/imagesRequests.json new file mode 100644 index 00000000..347c791b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/imagesRequests.json @@ -0,0 +1,44 @@ +{ + "name": "imagesRequests", + "displayName": "Images Requests", + "description": "Daily Cloudflare Images request counts for an account", + "tags": ["Media"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){imagesRequestsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){sum{requests}dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "imagesRequests.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/imagesTransformations.json b/plugins/Cloudflare/v2/dataStreams/imagesTransformations.json new file mode 100644 index 00000000..dec2be8f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/imagesTransformations.json @@ -0,0 +1,44 @@ +{ + "name": "imagesTransformations", + "displayName": "Images Unique Transformations", + "description": "Daily count of unique image transformations served for an account", + "tags": ["Media"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){imagesUniqueTransformations(limit:10000,filter:{date_geq:$start,date_leq:$end},orderBy:[date_ASC]){date transformations}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "postRequestScript": "imagesTransformations.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "transformations", + "displayName": "Unique Transformations", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/kvNamespaces.json b/plugins/Cloudflare/v2/dataStreams/kvNamespaces.json new file mode 100644 index 00000000..817a6c6f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/kvNamespaces.json @@ -0,0 +1,77 @@ +{ + "name": "kvNamespaces", + "displayName": "KV Namespaces", + "description": "Workers KV namespaces in a Cloudflare account", + "tags": [ + "Storage" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/storage/kv/namespaces", + "postRequestScript": "kvNamespaces.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "100" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "namespaceTitle", + "displayName": "Namespace", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare KV Namespace" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "supportsUrlEncoding", + "displayName": "Supports URL Encoding", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/kvOperations.json b/plugins/Cloudflare/v2/dataStreams/kvOperations.json new file mode 100644 index 00000000..50ef33d1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/kvOperations.json @@ -0,0 +1,66 @@ +{ + "name": "kvOperations", + "displayName": "KV Operations", + "description": "Daily read, write, delete and list operation counts and latency for a Workers KV namespace", + "tags": ["Storage", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$namespaceId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){kvOperationsAdaptiveGroups(limit:10000,filter:{namespaceId:$namespaceId,date_geq:$start,date_leq:$end},orderBy:[date_DESC]){sum{requests}dimensions{date actionType}quantiles{latencyMsP50 latencyMsP90 latencyMsP99}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.kvOperationsAdaptiveGroups", + "expandInnerObjects": true, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare KV Namespace"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.actionType", + "displayName": "Operation", + "shape": "string", + "role": "label" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "quantiles.latencyMsP50", + "displayName": "Latency P50", + "shape": "milliseconds" + }, + { + "name": "quantiles.latencyMsP90", + "displayName": "Latency P90", + "shape": "milliseconds" + }, + { + "name": "quantiles.latencyMsP99", + "displayName": "Latency P99", + "shape": "milliseconds" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/kvStorage.json b/plugins/Cloudflare/v2/dataStreams/kvStorage.json new file mode 100644 index 00000000..98aba56d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/kvStorage.json @@ -0,0 +1,50 @@ +{ + "name": "kvStorage", + "displayName": "KV Storage", + "description": "Daily stored key count and byte size for a Workers KV namespace", + "tags": ["Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$namespaceId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){kvStorageAdaptiveGroups(filter:{namespaceId:$namespaceId,date_geq:$start,date_leq:$end},limit:10000,orderBy:[date_DESC]){max{keyCount byteCount}dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.kvStorageAdaptiveGroups", + "expandInnerObjects": true, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare KV Namespace"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.keyCount", + "displayName": "Keys", + "shape": "number", + "role": "value" + }, + { + "name": "max.byteCount", + "displayName": "Size", + "shape": "bytes" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/loadBalancerPoolHealth.json b/plugins/Cloudflare/v2/dataStreams/loadBalancerPoolHealth.json new file mode 100644 index 00000000..a7f16b7c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/loadBalancerPoolHealth.json @@ -0,0 +1,79 @@ +{ + "name": "loadBalancerPoolHealth", + "displayName": "Load Balancer Pool Health", + "description": "Per-origin health, response time and failure reason for a load balancer pool at each Cloudflare edge location", + "tags": ["Network", "Availability"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.accountId}}/load_balancers/pools/{{object.rawId}}/health", + "postRequestScript": "loadBalancerPoolHealth.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Load Balancer Pool"] + } + }, + "metadata": [ + { + "name": "colo", + "displayName": "Location", + "shape": "string", + "role": "label" + }, + { + "name": "origin", + "displayName": "Origin", + "shape": "string" + }, + { + "name": "healthy", + "displayName": "Healthy", + "shape": "boolean", + "role": "value" + }, + { + "name": "health", + "displayName": "Health", + "computed": true, + "valueExpression": "{{ $['healthy'] ? 'Healthy' : 'Unhealthy' }}", + "shape": [ + "state", + { + "map": { + "success": ["Healthy"], + "error": ["Unhealthy"] + } + } + ] + }, + { + "name": "responseCode", + "displayName": "Response Code", + "shape": "number" + }, + { + "name": "rtt", + "displayName": "Response Time", + "shape": "string" + }, + { + "name": "failureReason", + "displayName": "Failure Reason", + "shape": "string" + }, + { + "name": "coloHealthy", + "displayName": "Location Healthy", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/loadBalancerPools.json b/plugins/Cloudflare/v2/dataStreams/loadBalancerPools.json new file mode 100644 index 00000000..fb89b7b7 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/loadBalancerPools.json @@ -0,0 +1,85 @@ +{ + "name": "loadBalancerPools", + "displayName": "Load Balancer Pools", + "description": "Load balancer origin pools in a Cloudflare account", + "tags": [ + "Network" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/load_balancers/pools", + "postRequestScript": "loadBalancerPools.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "poolName", + "displayName": "Pool", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Load Balancer Pool" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "enabled", + "displayName": "Enabled", + "shape": "boolean" + }, + { + "name": "originCount", + "displayName": "Origins", + "shape": "number" + }, + { + "name": "minimumOrigins", + "displayName": "Minimum Origins", + "shape": "number" + }, + { + "name": "monitorId", + "displayName": "Monitor", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Modified", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/pagesDeployments.json b/plugins/Cloudflare/v2/dataStreams/pagesDeployments.json new file mode 100644 index 00000000..366ec552 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pagesDeployments.json @@ -0,0 +1,102 @@ +{ + "name": "pagesDeployments", + "displayName": "Pages Deployments", + "description": "Deployment history for a Cloudflare Pages project including branch, commit and status", + "tags": [ + "Pages", + "CI/CD" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.accountId}}/pages/projects/{{object.name}}/deployments", + "postRequestScript": "pagesDeployments.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "10" + }, + "offset": { + "mode": "page", + "rowCountIn": { "realm": "payloadArraySize", "path": "result" }, + "base": 1 + }, + "out": { "realm": "queryArg", "path": "page" } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Pages Project" + ] + } + }, + "metadata": [ + { + "name": "short_id", + "displayName": "Deployment", + "shape": "string", + "role": "label" + }, + { + "name": "environment", + "displayName": "Environment", + "shape": "string" + }, + { + "name": "status", + "displayName": "Status", + "shape": [ + "state", + { + "map": { + "success": ["success"], + "error": ["failure", "canceled"], + "warning": ["skipped", "active", "building", "queued"], + "unknown": ["idle"] + } + } + ] + }, + { + "name": "stage", + "displayName": "Stage", + "shape": "string" + }, + { + "name": "url", + "displayName": "URL", + "shape": "url" + }, + { + "name": "branch", + "displayName": "Branch", + "shape": "string" + }, + { + "name": "commit", + "displayName": "Commit", + "shape": "string" + }, + { + "name": "commitMessage", + "displayName": "Commit Message", + "shape": "string" + }, + { + "name": "created_on", + "displayName": "Created", + "shape": "date", + "role": "timestamp" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/pagesFunctionsInvocations.json b/plugins/Cloudflare/v2/dataStreams/pagesFunctionsInvocations.json new file mode 100644 index 00000000..d8518fc4 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pagesFunctionsInvocations.json @@ -0,0 +1,78 @@ +{ + "name": "pagesFunctionsInvocations", + "displayName": "Pages Functions Invocations", + "description": "Requests, errors and CPU time for the Pages Functions running in an account, by function", + "tags": ["Pages", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){pagesFunctionsInvocationsAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requests errors subrequests}quantiles{cpuTimeP50 cpuTimeP99}dimensions{datetime scriptName status}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.pagesFunctionsInvocationsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.scriptName", + "displayName": "Function", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.status", + "displayName": "Status", + "shape": "string" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { "name": "sum.errors", "displayName": "Errors", "shape": "number" }, + { + "name": "sum.subrequests", + "displayName": "Subrequests", + "shape": "number" + }, + { "name": "quantiles.cpuTimeP50", "visible": false }, + { "name": "quantiles.cpuTimeP99", "visible": false }, + { + "name": "cpuTimeP50Ms", + "displayName": "CPU Time P50", + "computed": true, + "valueExpression": "{{ Number($['quantiles.cpuTimeP50']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "cpuTimeP99Ms", + "displayName": "CPU Time P99", + "computed": true, + "valueExpression": "{{ Number($['quantiles.cpuTimeP99']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/pagesProjects.json b/plugins/Cloudflare/v2/dataStreams/pagesProjects.json new file mode 100644 index 00000000..4cb04ead --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pagesProjects.json @@ -0,0 +1,126 @@ +{ + "name": "pagesProjects", + "displayName": "Pages Projects", + "description": "Cloudflare Pages projects in an account with their production branch and latest deployment", + "tags": [ + "Pages" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/pages/projects", + "postRequestScript": "pagesProjects.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "10" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "projectName", + "displayName": "Project", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Pages Project" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "subdomain", + "displayName": "Subdomain", + "shape": "string" + }, + { + "name": "domains", + "displayName": "Domains", + "shape": "string" + }, + { + "name": "primaryDomain", + "displayName": "Primary Domain", + "shape": "string" + }, + { + "name": "productionBranch", + "displayName": "Production Branch", + "shape": "string" + }, + { + "name": "latestDeploymentStatus", + "displayName": "Latest Deployment", + "shape": [ + "state", + { + "map": { + "success": [ + "success" + ], + "error": [ + "failure", + "canceled" + ], + "warning": [ + "idle", + "active", + "queued", + "building" + ] + } + } + ] + }, + { + "name": "latestDeploymentOn", + "displayName": "Last Deployed", + "shape": "date" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/pipelineIngestion.json b/plugins/Cloudflare/v2/dataStreams/pipelineIngestion.json new file mode 100644 index 00000000..ffd25320 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pipelineIngestion.json @@ -0,0 +1,59 @@ +{ + "name": "pipelineIngestion", + "displayName": "Pipeline Ingestion", + "description": "Records and bytes ingested by a Cloudflare Pipeline", + "tags": ["Compute"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$pipelineId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){pipelinesIngestionAdaptiveGroups(limit:10000,filter:{pipelineId:$pipelineId,datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count sum{ingestedBytes ingestedRecords} dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "pipelineId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.pipelinesIngestionAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Pipeline"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.ingestedRecords", + "displayName": "Records Ingested", + "shape": "number", + "role": "value" + }, + { + "name": "sum.ingestedBytes", + "displayName": "Bytes Ingested", + "shape": "bytes" + }, + { + "name": "count", + "displayName": "Ingestion Operations", + "shape": "number" + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/pipelines.json b/plugins/Cloudflare/v2/dataStreams/pipelines.json new file mode 100644 index 00000000..ac612c62 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pipelines.json @@ -0,0 +1,65 @@ +{ + "name": "pipelines", + "displayName": "Pipelines", + "description": "Cloudflare Pipelines defined in an account", + "tags": [ + "Compute" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/pipelines", + "postRequestScript": "pipelines.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "pipelineName", + "displayName": "Pipeline", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Pipeline" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "endpoint", + "displayName": "Endpoint", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueBacklog.json b/plugins/Cloudflare/v2/dataStreams/queueBacklog.json new file mode 100644 index 00000000..1c9a03ac --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueBacklog.json @@ -0,0 +1,51 @@ +{ + "name": "queueBacklog", + "displayName": "Queue Backlog", + "description": "Average number of messages and bytes waiting in a queue over time", + "tags": ["Queues"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$queueId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){queueBacklogAdaptiveGroups(limit:10000,filter:{queueId:$queueId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetimeHour_ASC]){avg{messages bytes}dimensions{datetimeHour}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.queueBacklogAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Queue"] } + }, + "metadata": [ + { + "name": "dimensions.datetimeHour", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "avg.messages", + "displayName": "Messages Backlogged", + "shape": ["number", { "decimalPlaces": 1 }], + "role": "value" + }, + { + "name": "avg.bytes", + "displayName": "Backlog Size", + "shape": "bytes" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json b/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json new file mode 100644 index 00000000..806a8974 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json @@ -0,0 +1,59 @@ +{ + "name": "queueConsumerMetrics", + "displayName": "Queue Consumer Metrics", + "description": "Average consumer concurrency for a Queue", + "tags": [ + "Queues", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$queueId:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){queueConsumerMetricsAdaptiveGroups(limit:10000,filter:{queueId:$queueId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){avg{concurrency}dimensions{datetime}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.queueConsumerMetricsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Queue" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "avg.concurrency", + "displayName": "Avg Consumer Concurrency", + "shape": ["number", { "decimalPlaces": 2 }], + "role": "value" + } + ], + "timeframes": [ + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json b/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json new file mode 100644 index 00000000..718141fc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json @@ -0,0 +1,95 @@ +{ + "name": "queueMessageOperations", + "displayName": "Queue Message Operations", + "description": "Message write, read and delete operations on a queue with their outcome and lag time", + "tags": ["Queues", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$queueId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){queueMessageOperationsAdaptiveGroups(limit:10000,filter:{queueId:$queueId,datetime_geq:$start,datetime_leq:$end},orderBy:[datetimeHour_ASC]){count sum{billableOperations bytes}avg{lagTime retryCount}max{messageSize}dimensions{datetimeHour actionType outcome consumerType}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.queueMessageOperationsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Queue"] } + }, + "metadata": [ + { + "name": "dimensions.datetimeHour", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.actionType", + "displayName": "Operation", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.outcome", + "displayName": "Outcome", + "shape": [ + "state", + { + "map": { + "success": ["success"], + "error": ["fail", "dlq"] + } + } + ] + }, + { + "name": "dimensions.consumerType", + "displayName": "Consumer Type", + "shape": "string" + }, + { + "name": "count", + "displayName": "Operations", + "shape": "number", + "role": "value" + }, + { + "name": "sum.billableOperations", + "displayName": "Billable Operations", + "shape": "number" + }, + { + "name": "sum.bytes", + "displayName": "Bytes", + "shape": "bytes" + }, + { + "name": "avg.lagTime", + "displayName": "Lag Time", + "shape": "milliseconds" + }, + { + "name": "avg.retryCount", + "displayName": "Avg Retries", + "shape": ["number", { "decimalPlaces": 2 }] + }, + { + "name": "max.messageSize", + "displayName": "Max Message Size", + "shape": "bytes" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queues.json b/plugins/Cloudflare/v2/dataStreams/queues.json new file mode 100644 index 00000000..fd579815 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queues.json @@ -0,0 +1,95 @@ +{ + "name": "queues", + "displayName": "Queues", + "description": "Cloudflare Queues in an account with their producer and consumer counts", + "tags": [ + "Queues" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/queues", + "postRequestScript": "queues.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "queueName", + "displayName": "Queue", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Queue" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "producers", + "displayName": "Producers", + "shape": "number" + }, + { + "name": "consumers", + "displayName": "Consumers", + "shape": "number" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Modified", + "shape": "date" + }, + { + "name": "consumerScripts", + "displayName": "Consumer Workers", + "shape": "string" + }, + { + "name": "primaryConsumerScript", + "displayName": "Primary Consumer", + "shape": "string" + }, + { + "name": "producerScripts", + "displayName": "Producer Workers", + "shape": "string" + }, + { + "name": "primaryProducerScript", + "displayName": "Primary Producer", + "shape": "string" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/r2Buckets.json b/plugins/Cloudflare/v2/dataStreams/r2Buckets.json new file mode 100644 index 00000000..1c37cdf6 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Buckets.json @@ -0,0 +1,70 @@ +{ + "name": "r2Buckets", + "displayName": "R2 Buckets", + "description": "R2 object storage buckets in a Cloudflare account", + "tags": [ + "Storage" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/r2/buckets", + "postRequestScript": "r2Buckets.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "bucketName", + "displayName": "Bucket", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare R2 Bucket" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "location", + "displayName": "Location", + "shape": "string" + }, + { + "name": "storageClass", + "displayName": "Storage Class", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/r2Operations.json b/plugins/Cloudflare/v2/dataStreams/r2Operations.json new file mode 100644 index 00000000..90fe40ea --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Operations.json @@ -0,0 +1,62 @@ +{ + "name": "r2Operations", + "displayName": "R2 Operations", + "description": "Requests and response bytes against an R2 bucket, broken down by operation and outcome", + "tags": ["Storage", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$bucketName:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){r2OperationsAdaptiveGroups(limit:10000,filter:{bucketName:$bucketName,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requests responseBytes}dimensions{datetime actionType actionStatus}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "bucketName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.r2OperationsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare R2 Bucket"] } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.actionType", + "displayName": "Operation", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.actionStatus", + "displayName": "Outcome", + "shape": "string" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.responseBytes", + "displayName": "Response Bytes", + "shape": "bytes" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/r2Storage.json b/plugins/Cloudflare/v2/dataStreams/r2Storage.json new file mode 100644 index 00000000..370b7029 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Storage.json @@ -0,0 +1,61 @@ +{ + "name": "r2Storage", + "displayName": "R2 Storage", + "description": "Stored object count and payload size for an R2 bucket over time", + "tags": ["Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$bucketName:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){r2StorageAdaptiveGroups(limit:10000,filter:{bucketName:$bucketName,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){max{objectCount payloadSize metadataSize uploadCount}dimensions{datetime}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "bucketName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.r2StorageAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare R2 Bucket"] } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.payloadSize", + "displayName": "Payload Size", + "shape": "bytes", + "role": "value" + }, + { + "name": "max.metadataSize", + "displayName": "Metadata Size", + "shape": "bytes" + }, + { + "name": "max.objectCount", + "displayName": "Objects", + "shape": "number" + }, + { + "name": "max.uploadCount", + "displayName": "Uploads", + "shape": "number" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/realtimeApps.json b/plugins/Cloudflare/v2/dataStreams/realtimeApps.json new file mode 100644 index 00000000..a3d858aa --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/realtimeApps.json @@ -0,0 +1,65 @@ +{ + "name": "realtimeApps", + "displayName": "Realtime Apps", + "description": "Cloudflare Realtime (Calls) applications in an account", + "tags": [ + "Media" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/calls/apps", + "postRequestScript": "realtimeApps.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "appName", + "displayName": "Application", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Realtime App" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Modified", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/realtimeUsage.json b/plugins/Cloudflare/v2/dataStreams/realtimeUsage.json new file mode 100644 index 00000000..1c931ffa --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/realtimeUsage.json @@ -0,0 +1,60 @@ +{ + "name": "realtimeUsage", + "displayName": "Realtime Usage", + "description": "Bandwidth sent and received by a Cloudflare Realtime App, broken down by track type", + "tags": ["Media"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$appId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){callsUsageAdaptiveGroups(limit:10000,filter:{appId:$appId,datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){sum{egressBytes ingressBytes} dimensions{date trackType}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "appId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.callsUsageAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Realtime App"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.trackType", + "displayName": "Track Type", + "shape": "string", + "role": "label" + }, + { + "name": "sum.egressBytes", + "displayName": "Bytes Sent", + "shape": "bytes", + "role": "value" + }, + { + "name": "sum.ingressBytes", + "displayName": "Bytes Received", + "shape": "bytes" + } + ], + "timeframes": ["last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json b/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json new file mode 100644 index 00000000..b5b46ebe --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json @@ -0,0 +1,71 @@ +{ + "name": "rumPageLoads", + "displayName": "Web Analytics Page Loads", + "description": "Page load and visit counts for a zone's Web Analytics (RUM) traffic grouped by a selectable dimension", + "tags": ["Zone", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$requestHost:string!){viewer{accounts(filter:{accountTag:$accountTag}){rumPageloadEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end,requestHost_like:$requestHost},orderBy:[count_DESC]){count sum{visits} dimensions{date {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}", + "requestHost": "{{'%' + object.name}}" + } + }, + "postRequestScript": "rumPageLoads.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "countryName", + "options": [ + { "value": "countryName", "label": "Country" }, + { "value": "deviceType", "label": "Device Type" }, + { "value": "userAgentBrowser", "label": "Browser" }, + { "value": "refererHost", "label": "Referer Host" }, + { "value": "requestPath", "label": "Path" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "pageViews", + "displayName": "Page Views", + "shape": "number", + "role": "value" + }, + { + "name": "visits", + "displayName": "Visits", + "shape": "number" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json b/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json new file mode 100644 index 00000000..a498d83b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json @@ -0,0 +1,82 @@ +{ + "name": "rumWebVitals", + "displayName": "Core Web Vitals", + "description": "Daily P75 Core Web Vitals (LCP, INP/FID, CLS) and RUM sample counts for a zone's hostnames", + "tags": ["Zone", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$hostFilter:string!){viewer{accounts(filter:{accountTag:$accountTag}){rumWebVitalsEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end,requestHost_like:$hostFilter},orderBy:[date_ASC]){count dimensions{date} quantiles{largestContentfulPaintP75 interactionToNextPaintP75 firstInputDelayP75 cumulativeLayoutShiftP75}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}", + "hostFilter": "{{'%' + object.name}}" + } + }, + "expandInnerObjects": true, + "pathToData": "data.viewer.accounts.0.rumWebVitalsEventsAdaptiveGroups", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "quantiles.largestContentfulPaintP75", + "visible": false + }, + { + "name": "largestContentfulPaintP75", + "displayName": "Largest Contentful Paint (P75)", + "computed": true, + "valueExpression": "{{ Number($['quantiles.largestContentfulPaintP75']) < 0 ? null : Number($['quantiles.largestContentfulPaintP75']) }}", + "shape": "milliseconds", + "role": "value" + }, + { + "name": "quantiles.interactionToNextPaintP75", + "visible": false + }, + { + "name": "quantiles.firstInputDelayP75", + "visible": false + }, + { + "name": "interactionToNextPaintP75", + "displayName": "Interaction to Next Paint (P75)", + "computed": true, + "valueExpression": "{{ Number($['quantiles.interactionToNextPaintP75']) >= 0 ? Number($['quantiles.interactionToNextPaintP75']) : (Number($['quantiles.firstInputDelayP75']) >= 0 ? Number($['quantiles.firstInputDelayP75']) : null) }}", + "shape": "milliseconds" + }, + { + "name": "quantiles.cumulativeLayoutShiftP75", + "visible": false + }, + { + "name": "cumulativeLayoutShiftP75", + "displayName": "Cumulative Layout Shift (P75)", + "computed": true, + "valueExpression": "{{ Number($['quantiles.cumulativeLayoutShiftP75']) < 0 ? null : Number($['quantiles.cumulativeLayoutShiftP75']) }}", + "shape": ["number", { "decimalPlaces": 3 }] + }, + { + "name": "count", + "displayName": "Samples", + "shape": "number" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/accessApps.js b/plugins/Cloudflare/v2/dataStreams/scripts/accessApps.js new file mode 100644 index 00000000..4846636d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/accessApps.js @@ -0,0 +1,16 @@ +// Stamps the account id from the scoped object onto every row so the Access +// analytics stream can build its account-scoped GraphQL query. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((app) => ({ + sourceId: app.id || app.uid, + appName: app.name, + accountId: accountId, + domain: app.domain || "", + appType: app.type || "", + sessionDuration: app.session_duration || "", + appLauncherVisible: Boolean(app.app_launcher_visible), + createdOn: app.created_at, + modifiedOn: app.updated_at, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/aiGateways.js b/plugins/Cloudflare/v2/dataStreams/scripts/aiGateways.js new file mode 100644 index 00000000..d3d40d8c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/aiGateways.js @@ -0,0 +1,17 @@ +// Gateway ids are only unique within an account, so the account id is prefixed +// onto the id to form a globally-unique sourceId. Field names are written +// defensively: no AI Gateway exists in the test account, so the response shape +// is taken from Cloudflare's docs rather than observed. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((g) => ({ + sourceId: `${accountId}:${g.id || g.name}`, + gatewayName: g.id || g.name || "", + accountId: accountId, + cacheTtl: typeof g.cache_ttl === "number" ? g.cache_ttl : null, + rateLimitingLimit: + typeof g.rate_limiting_limit === "number" ? g.rate_limiting_limit : null, + collectLogs: Boolean(g.collect_logs), + createdOn: g.created_at || g.created_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/auditLogs.js b/plugins/Cloudflare/v2/dataStreams/scripts/auditLogs.js new file mode 100644 index 00000000..641f2945 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/auditLogs.js @@ -0,0 +1,34 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/auditLogs.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the breakdown value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.actionType vs dimensions.actorEmail vs dimensions.resourceType). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].auditLogsGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + actionCount: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/autoragInstances.js b/plugins/Cloudflare/v2/dataStreams/scripts/autoragInstances.js new file mode 100644 index 00000000..61a8795f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/autoragInstances.js @@ -0,0 +1,13 @@ +// Written defensively: no AutoRAG instance exists in the test account, so the +// response shape follows Cloudflare's docs and falls back across likely keys. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((r) => ({ + sourceId: r.id || `${accountId}:${r.name}`, + ragName: r.name || r.id || "", + accountId: accountId, + status: r.status || "", + source: r.source || (r.data_source && r.data_source.type) || "", + createdOn: r.created_at || r.created_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/browserRendering.js b/plugins/Cloudflare/v2/dataStreams/scripts/browserRendering.js new file mode 100644 index 00000000..8ac020bb --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/browserRendering.js @@ -0,0 +1,49 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/browserRendering.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.clientLibrary vs dimensions.recordingMode). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. +// +// Rows are grouped by date + sessionId (+ the chosen breakdown dimension), so each row's +// min/max aggregates collapse to that one session's actual start/end time - used to derive +// a genuine per-session duration, which the API has no single field for. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].browserRenderingEventsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const dims = row.dimensions || {}; + const rawValue = dimensionKey ? dims[dimensionKey] : undefined; + const breakdown = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + const startTime = row.min && row.min.earliestBrowserStartTime; + const endTime = row.max && row.max.latestBrowserEndTime; + const durationMs = + startTime && endTime ? new Date(endTime).getTime() - new Date(startTime).getTime() : null; + + return { + date: dims.date, + sessionId: dims.sessionId, + breakdown: breakdown, + count: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0, + durationMs: durationMs, + avgConcurrentSessions: Number((row.avg && row.avg.avgConcurrentSessions) || 0) || 0, + startTime: startTime, + endTime: endTime + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/cacheReserveOperations.js b/plugins/Cloudflare/v2/dataStreams/scripts/cacheReserveOperations.js new file mode 100644 index 00000000..9b6b124f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/cacheReserveOperations.js @@ -0,0 +1,34 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/cacheReserveOperations.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.operationClass vs dimensions.actionStatus). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].cacheReserveOperationsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + datetime: row.dimensions && row.dimensions.datetime, + breakdown: label, + operationCount: Number((row.sum && row.sum.requests !== undefined ? row.sum.requests : 0)) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/containerApps.js b/plugins/Cloudflare/v2/dataStreams/scripts/containerApps.js new file mode 100644 index 00000000..e7e54623 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/containerApps.js @@ -0,0 +1,17 @@ +// Written defensively: no container application exists in the test account, so +// the response shape follows Cloudflare's docs and falls back across likely keys. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((a) => { + const cfg = a.configuration || {}; + return { + sourceId: a.id || `${accountId}:${a.name}`, + appName: a.name || a.id || "", + accountId: accountId, + instances: typeof a.instances === "number" ? a.instances : null, + imageName: cfg.image || a.image || "", + schedulingPolicy: a.scheduling_policy || "", + createdOn: a.created_at || a.created_on, + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/containerMetrics.js b/plugins/Cloudflare/v2/dataStreams/scripts/containerMetrics.js new file mode 100644 index 00000000..7beb34ce --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/containerMetrics.js @@ -0,0 +1,42 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/containerMetrics.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.region vs dimensions.location vs dimensions.procType). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].containersMetricsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const dims = row.dimensions || {}; + const rawValue = dimensionKey ? dims[dimensionKey] : undefined; + const breakdown = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + const avg = row.avg || {}; + const sum = row.sum || {}; + + return { + date: dims.date, + breakdown: breakdown, + count: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0, + avgCpuUtilization: Number(avg.cpuUtilization || 0) || 0, + avgMemory: Number(avg.memory || 0) || 0, + avgContainerUptimeMs: Number(avg.containerUptime || 0) || 0, + sumRxBytes: Number(sum.rxBytes || 0) || 0, + sumTxBytes: Number(sum.txBytes || 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/d1Databases.js b/plugins/Cloudflare/v2/dataStreams/scripts/d1Databases.js new file mode 100644 index 00000000..39edabbd --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/d1Databases.js @@ -0,0 +1,14 @@ +// Stamps the account id from the scoped object onto every row so downstream +// D1 analytics streams can build their account-scoped GraphQL query. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((db) => ({ + sourceId: db.uuid, + databaseName: db.name, + accountId: accountId, + version: db.version || "", + numTables: typeof db.num_tables === "number" ? db.num_tables : null, + fileSize: typeof db.file_size === "number" ? db.file_size : null, + createdOn: db.created_at, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/dmarcReports.js b/plugins/Cloudflare/v2/dataStreams/scripts/dmarcReports.js new file mode 100644 index 00000000..b397f0b9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/dmarcReports.js @@ -0,0 +1,35 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/dmarcReports.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.disposition vs dimensions.domain vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].dmarcReportsSourcesAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + messageCount: Number((row.sum && row.sum.totalMatchingMessages) || 0) || 0, + dmarcPassRate: Number((row.avg && row.avg.dmarc) || 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/dnsFirewallAnalytics.js b/plugins/Cloudflare/v2/dataStreams/scripts/dnsFirewallAnalytics.js new file mode 100644 index 00000000..cd1ea7e5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/dnsFirewallAnalytics.js @@ -0,0 +1,41 @@ +// dataStreams/scripts/dnsFirewallAnalytics.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.responseCode vs dimensions.queryType vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. +// processingTimeUsP50 is reported by Cloudflare in microseconds; convert to milliseconds. +// +// Cloudflare answers a failed GraphQL query with HTTP 200 and a populated top-level +// `errors` array. A postRequestScript bypasses the stream's declarative `errorHandling`, +// so without this check a genuine failure would silently shape to zero rows instead of +// surfacing as an error. +const graphqlErrors = data && Array.isArray(data.errors) ? data.errors : []; +if (graphqlErrors.length) { + throw new Error( + "Cloudflare GraphQL error: " + + graphqlErrors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].dnsFirewallAnalyticsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + queries: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0, + medianProcessingTimeMs: Number((row.quantiles && row.quantiles.processingTimeUsP50) || 0) / 1000 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/durableObjectNamespaces.js b/plugins/Cloudflare/v2/dataStreams/scripts/durableObjectNamespaces.js new file mode 100644 index 00000000..86c01155 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/durableObjectNamespaces.js @@ -0,0 +1,14 @@ +// Stamps the account id from the scoped object onto every row so the Durable +// Object analytics streams can build their account-scoped GraphQL query, and +// exposes the owning Worker script name as a correlation join key. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((ns) => ({ + sourceId: ns.id, + namespaceName: ns.name || ns.id, + accountId: accountId, + scriptName: ns.script || "", + className: ns.class || "", + usesSqlite: Boolean(ns.use_sqlite), +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/emailRouting.js b/plugins/Cloudflare/v2/dataStreams/scripts/emailRouting.js new file mode 100644 index 00000000..837d5ff1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/emailRouting.js @@ -0,0 +1,34 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/emailRouting.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.action vs dimensions.status vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].emailRoutingAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + messageCount: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/gatewayDnsQueries.js b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayDnsQueries.js new file mode 100644 index 00000000..8b11f27b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayDnsQueries.js @@ -0,0 +1,39 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/gatewayDnsQueries.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.resolverDecision vs dimensions.categoryNames vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].gatewayResolverQueriesAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = + rawValue === undefined || rawValue === null || rawValue === "" || (Array.isArray(rawValue) && rawValue.length === 0) + ? "Unknown" + : Array.isArray(rawValue) + ? rawValue.join(", ") + : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + queryCount: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/gatewayHttpRequests.js b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayHttpRequests.js new file mode 100644 index 00000000..7cebe51e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayHttpRequests.js @@ -0,0 +1,34 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/gatewayHttpRequests.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.action vs dimensions.httpHost vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].gatewayL7RequestsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + requests: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/gatewayNetworkSessions.js b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayNetworkSessions.js new file mode 100644 index 00000000..fcd76918 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/gatewayNetworkSessions.js @@ -0,0 +1,39 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/gatewayNetworkSessions.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.action vs dimensions.destinationIp vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].gatewayL4SessionsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = + rawValue === undefined || rawValue === null || rawValue === "" || (Array.isArray(rawValue) && rawValue.length === 0) + ? "Unknown" + : Array.isArray(rawValue) + ? rawValue.join(", ") + : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + sessionCount: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js new file mode 100644 index 00000000..da1ba865 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js @@ -0,0 +1,88 @@ +// A post-request script is required for this stream (unusually - most streams should +// use pathToData instead) for two reasons that can't be expressed declaratively: +// 1. The row location is chosen by the user per tile. `config.pathToData` is a single +// static string baked into the stream, so it cannot follow a path that changes with +// the query; only a script can read the user's value from `context.config`. +// 2. Cloudflare answers a failed GraphQL query with HTTP 200 and a populated `errors` +// array, so the request never looks like a failure and `errorHandling` never fires. +// Without this script a broken query silently shapes to zero rows. +// It also flattens the nested GraphQL group shape (dimensions/sum/avg/uniq/quantiles) +// into dot-notation columns, matching the other Cloudflare analytics streams. + +const body = data || {}; + +const graphqlErrors = Array.isArray(body.errors) ? body.errors : []; +if (graphqlErrors.length) { + const messages = graphqlErrors + .map((e) => (e && e.message) || JSON.stringify(e)) + .filter(Boolean); + throw new Error('Cloudflare GraphQL error: ' + messages.join(' | ')); +} + +// Every array in the response, as a dot path - used to make path errors actionable. +const arrayPaths = (node, prefix, depth, found) => { + if (depth > 6 || node === null || typeof node !== 'object') return found; + if (Array.isArray(node)) { + if (prefix) found.push(prefix); + if (node.length) arrayPaths(node[0], prefix + '.0', depth + 1, found); + return found; + } + for (const key of Object.keys(node)) { + arrayPaths(node[key], prefix ? prefix + '.' + key : key, depth + 1, found); + } + return found; +}; + +const candidates = () => { + const paths = arrayPaths(body, '', 0, []); + return paths.length + ? ' Arrays available in this response: ' + paths.join(', ') + : ' This response contains no arrays.'; +}; + +const walk = (root, path) => + path + .split('.') + .filter((segment) => segment.length) + .reduce( + (node, key) => (node === null || node === undefined ? undefined : node[key]), + root + ); + +const requestedPath = String( + (context && context.config && context.config.pathToData) || '' +).trim(); + +if (!requestedPath) { + throw new Error('Set "Path to rows" to the path of the array of rows in the query response.' + candidates()); +} + +// Tolerate a path written with or without the leading `data.` envelope. +let rows = walk(body, requestedPath); +if (rows === undefined) rows = walk(body.data, requestedPath); + +if (rows === undefined || rows === null) { + throw new Error('Nothing found at "' + requestedPath + '".' + candidates()); +} +if (!Array.isArray(rows)) { + rows = [rows]; +} + +const flatten = (value, prefix, out) => { + for (const key of Object.keys(value)) { + const child = value[key]; + const name = prefix ? prefix + '.' + key : key; + if (child !== null && typeof child === 'object' && !Array.isArray(child)) { + flatten(child, name, out); + } else { + out[name] = child; + } + } + return out; +}; + +result = rows.map((row) => + row !== null && typeof row === 'object' && !Array.isArray(row) + ? flatten(row, '', {}) + : { value: row } +); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/hyperdriveConfigs.js b/plugins/Cloudflare/v2/dataStreams/scripts/hyperdriveConfigs.js new file mode 100644 index 00000000..dbc9778e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/hyperdriveConfigs.js @@ -0,0 +1,18 @@ +// Flattens the nested origin/caching objects and stamps the account id from the +// scoped object so the Hyperdrive analytics stream can build its query. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((cfg) => { + const origin = cfg.origin || {}; + const caching = cfg.caching || {}; + return { + sourceId: cfg.id, + configName: cfg.name || cfg.id, + accountId: accountId, + database: origin.database || "", + host: origin.host || "", + scheme: origin.scheme || "", + cachingDisabled: Boolean(caching.disabled), + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/imagesRequests.js b/plugins/Cloudflare/v2/dataStreams/scripts/imagesRequests.js new file mode 100644 index 00000000..f1ff0d1d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/imagesRequests.js @@ -0,0 +1,27 @@ +// dataStreams/scripts/imagesRequests.js +// Cloudflare answers a failed GraphQL query with HTTP 200 and a populated `errors` array, +// so the request never looks like a failure and the stream's `errorHandling` does not +// reliably fire on it (confirmed against this endpoint's imagesTransformationsAdaptiveGroups +// node, which returns exactly this shape). Check for it explicitly so a broken/over-wide +// query surfaces as a real error instead of silently shaping to a degenerate row. +const graphqlErrors = (data && data.errors) || []; +if (graphqlErrors.length) { + throw new Error( + "Cloudflare GraphQL error: " + + graphqlErrors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].imagesRequestsAdaptiveGroups) || + []; + +result = groups.map((row) => ({ + date: row.dimensions && row.dimensions.date, + requests: Number((row.sum && row.sum.requests) || 0) || 0 +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/imagesTransformations.js b/plugins/Cloudflare/v2/dataStreams/scripts/imagesTransformations.js new file mode 100644 index 00000000..19ead6ad --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/imagesTransformations.js @@ -0,0 +1,20 @@ +// Cloudflare's GraphQL API answers HTTP 200 even when the query failed, and the +// stream-level errorHandling does not reliably fire for that case, so the error +// is raised here explicitly rather than shaping to a misleading empty result. +// +// Note this uses imagesUniqueTransformations, not imagesTransformationsAdaptiveGroups: +// the latter returns INTERNAL_SERVER_ERROR from Cloudflare for every query shape +// and timeframe tested, on every account tested. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +const accounts = + (data && data.data && data.data.viewer && data.data.viewer.accounts) || []; +const rows = (accounts[0] || {}).imagesUniqueTransformations || []; + +result = rows.map((r) => ({ + date: r.date, + transformations: + typeof r.transformations === "number" ? r.transformations : null, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/kvNamespaces.js b/plugins/Cloudflare/v2/dataStreams/scripts/kvNamespaces.js new file mode 100644 index 00000000..9c97377d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/kvNamespaces.js @@ -0,0 +1,11 @@ +// Stamps the account id from the scoped object onto every row so downstream +// KV analytics streams can build their account-scoped GraphQL query. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((ns) => ({ + sourceId: ns.id, + namespaceTitle: ns.title, + accountId: accountId, + supportsUrlEncoding: Boolean(ns.supports_url_encoding), +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPoolHealth.js b/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPoolHealth.js new file mode 100644 index 00000000..cb35ec8d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPoolHealth.js @@ -0,0 +1,31 @@ +// The pool health endpoint returns a doubly-nested map keyed by colo and then +// by origin name, which config cannot flatten - expandInnerObjects only reaches +// one level, and the keys are dynamic. Flatten to one row per origin per colo. +const popHealth = (data && data.result && data.result.pop_health) || {}; + +const rows = []; +for (const colo of Object.keys(popHealth)) { + const pop = popHealth[colo] || {}; + for (const entry of pop.origins || []) { + for (const originName of Object.keys(entry || {})) { + const o = entry[originName] || {}; + rows.push({ + colo: colo, + origin: originName, + // Absent health is unknown, not unhealthy - Boolean() would + // report an origin Cloudflare has no data for as down. + healthy: typeof o.healthy === "boolean" ? o.healthy : null, + responseCode: + typeof o.response_code === "number" + ? o.response_code + : null, + rtt: o.rtt || "", + failureReason: o.failure_reason || "", + coloHealthy: + typeof pop.healthy === "boolean" ? pop.healthy : null, + }); + } + } +} + +result = rows; diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPools.js b/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPools.js new file mode 100644 index 00000000..c27b8aba --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/loadBalancerPools.js @@ -0,0 +1,21 @@ +// Collapses the nested origins array to a count and stamps the account id from +// the scoped object onto every row. +// Note: the list pools endpoint does not return a "healthy" field (Cloudflare's +// Pool schema has no such property here - health comes from the separate +// /pools/{id}/health endpoint, see the loadBalancerPoolHealth stream), so no +// healthy column is produced from this stream to avoid a misleading always-false value. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((pool) => ({ + sourceId: pool.id, + poolName: pool.name, + accountId: accountId, + enabled: Boolean(pool.enabled), + originCount: (pool.origins || []).length, + minimumOrigins: + typeof pool.minimum_origins === "number" ? pool.minimum_origins : null, + monitorId: pool.monitor || "", + createdOn: pool.created_on, + modifiedOn: pool.modified_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/pagesDeployments.js b/plugins/Cloudflare/v2/dataStreams/scripts/pagesDeployments.js new file mode 100644 index 00000000..e826b3bc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/pagesDeployments.js @@ -0,0 +1,19 @@ +// Flattens the deployment's nested latest_stage and deployment_trigger.metadata +// (two levels deep, beyond what expandInnerObjects can reach in one pass). +result = ((data && data.result) || []).map((deployment) => { + const stage = deployment.latest_stage || {}; + const trigger = deployment.deployment_trigger || {}; + const meta = trigger.metadata || {}; + + return { + short_id: deployment.short_id || deployment.id, + environment: deployment.environment || "", + status: stage.status || "", + stage: stage.name || "", + url: deployment.url || "", + branch: meta.branch || "", + commit: meta.commit_hash ? meta.commit_hash.substring(0, 7) : "", + commitMessage: meta.commit_message || "", + created_on: deployment.created_on, + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/pagesProjects.js b/plugins/Cloudflare/v2/dataStreams/scripts/pagesProjects.js new file mode 100644 index 00000000..9ebfd45b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/pagesProjects.js @@ -0,0 +1,24 @@ +// Flattens the deeply-nested latest_deployment.latest_stage structure and +// stamps the account id from the scoped object onto every row. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((project) => { + const latest = project.latest_deployment || {}; + const stage = latest.latest_stage || {}; + return { + sourceId: project.id, + projectName: project.name, + accountId: accountId, + subdomain: project.subdomain || "", + // A readable list for display only. Array properties are JSON-stringified + // on import (SAAS-9816), so the Pages Project -> Zone rule correlates on + // primaryDomain below rather than on this column. + domains: (project.domains || []).join(", "), + primaryDomain: (project.domains || [])[0] || "", + productionBranch: project.production_branch || "", + latestDeploymentStatus: stage.status || "", + latestDeploymentOn: latest.modified_on || latest.created_on, + createdOn: project.created_on, + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/pipelines.js b/plugins/Cloudflare/v2/dataStreams/scripts/pipelines.js new file mode 100644 index 00000000..55bdb4f1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/pipelines.js @@ -0,0 +1,12 @@ +// Written defensively: no pipeline exists in the test account, so the response +// shape follows Cloudflare's docs and falls back across likely keys. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((p) => ({ + sourceId: p.id || `${accountId}:${p.name}`, + pipelineName: p.name || p.id || "", + accountId: accountId, + endpoint: p.endpoint || "", + createdOn: p.created_at || p.created_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/queues.js b/plugins/Cloudflare/v2/dataStreams/scripts/queues.js new file mode 100644 index 00000000..dc048a08 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/queues.js @@ -0,0 +1,41 @@ +// Collapses the producers/consumers arrays to counts and stamps the account id +// from the scoped object onto every row so the Queues analytics streams can +// build their account-scoped GraphQL query. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((queue) => ({ + sourceId: queue.queue_id, + queueName: queue.queue_name, + accountId: accountId, + producers: + typeof queue.producers_total_count === "number" + ? queue.producers_total_count + : (queue.producers || []).length, + consumers: + typeof queue.consumers_total_count === "number" + ? queue.consumers_total_count + : (queue.consumers || []).length, + // The consuming Worker script names as a readable list, for display only. + // Array properties are JSON-stringified on import (SAAS-9816), so the + // Queue -> Worker rule correlates on primaryConsumerScript below. + // HTTP-pull consumers have no service name and are filtered out. + consumerScripts: (queue.consumers || []) + .map((c) => c && c.service) + .filter(Boolean) + .join(", "), + primaryConsumerScript: + ((queue.consumers || []).map((c) => c && c.service).filter(Boolean))[0] || + "", + // The producing Worker script names, same display-only reasoning as consumers; + // the producer rule correlates on primaryProducerScript. + producerScripts: (queue.producers || []) + .map((p) => p && p.script) + .filter(Boolean) + .join(", "), + primaryProducerScript: + ((queue.producers || []).map((p) => p && p.script).filter(Boolean))[0] || + "", + createdOn: queue.created_on, + modifiedOn: queue.modified_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/r2Buckets.js b/plugins/Cloudflare/v2/dataStreams/scripts/r2Buckets.js new file mode 100644 index 00000000..fb5c59da --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/r2Buckets.js @@ -0,0 +1,14 @@ +// R2 nests the bucket array under result.buckets, and bucket names are only +// unique within an account, so the account id from the scoped object is +// prefixed onto the name to form a globally-unique sourceId. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result && data.result.buckets) || []).map((bucket) => ({ + sourceId: `${accountId}:${bucket.name}`, + bucketName: bucket.name, + accountId: accountId, + location: bucket.location || "", + storageClass: bucket.storage_class || "", + createdOn: bucket.creation_date, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/realtimeApps.js b/plugins/Cloudflare/v2/dataStreams/scripts/realtimeApps.js new file mode 100644 index 00000000..d22393a3 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/realtimeApps.js @@ -0,0 +1,12 @@ +// Written defensively: no Realtime application exists in the test account, so +// the response shape follows Cloudflare's docs and falls back across likely keys. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((a) => ({ + sourceId: a.uid || a.id, + appName: a.name || a.uid || a.id || "", + accountId: accountId, + createdOn: a.created, + modifiedOn: a.modified, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/rumPageLoads.js b/plugins/Cloudflare/v2/dataStreams/scripts/rumPageLoads.js new file mode 100644 index 00000000..36a37fbc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/rumPageLoads.js @@ -0,0 +1,35 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/rumPageLoads.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.countryName vs dimensions.deviceType vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].rumPageloadEventsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + pageViews: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0, + visits: Number((row.sum && row.sum.visits) || 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/streamCmcd.js b/plugins/Cloudflare/v2/dataStreams/scripts/streamCmcd.js new file mode 100644 index 00000000..2d81407f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/streamCmcd.js @@ -0,0 +1,38 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/streamCmcd.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.country vs dimensions.resolution vs dimensions.streamType). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].streamCMCDAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + const avg = row.avg || {}; + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + sampleCount: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0, + avgBufferingDurationMs: Number(avg.bufferStarvationDuration) || 0, + avgStartupBufferingDurationMs: Number(avg.initialBufferStarvationDuration) || 0, + avgEncodedBitrate: Number(avg.encodedBitrate) || 0, + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/streamVideos.js b/plugins/Cloudflare/v2/dataStreams/scripts/streamVideos.js new file mode 100644 index 00000000..4011627e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/streamVideos.js @@ -0,0 +1,24 @@ +// Stream nests the video name under meta and the processing state under status, +// which expandInnerObjects cannot reach through a script-free config, so both +// are flattened here alongside the account id from the scoped object. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((v) => { + const meta = v.meta || {}; + const status = v.status || {}; + return { + sourceId: v.uid, + videoName: meta.name || v.uid, + accountId: accountId, + statusState: status.state || "", + // Cloudflare reports -1 while a video is still being processed and its + // duration is not yet known; that is absent data, not a real length. + duration: + typeof v.duration === "number" && v.duration >= 0 ? v.duration : null, + size: typeof v.size === "number" ? v.size : null, + readyToStream: Boolean(v.readyToStream), + createdOn: v.created, + preview: v.preview || "", + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/tunnelConnections.js b/plugins/Cloudflare/v2/dataStreams/scripts/tunnelConnections.js new file mode 100644 index 00000000..e71561b0 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/tunnelConnections.js @@ -0,0 +1,15 @@ +// The connections endpoint returns one entry per connector, each with a nested +// `conns` array (the connector's individual edge connections). Flatten that +// array-into-rows structure so each row is one active connection, carrying the +// parent connector's architecture down onto every connection row. +result = ((data && data.result) || []).flatMap((connector) => + ((connector && connector.conns) || []).map((conn) => ({ + connectionId: conn.id, + colo_name: conn.colo_name, + origin_ip: conn.origin_ip, + opened_at: conn.opened_at, + client_version: conn.client_version || connector.version, + arch: connector.arch, + is_pending_reconnect: !!conn.is_pending_reconnect, + })), +); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/tunnels.js b/plugins/Cloudflare/v2/dataStreams/scripts/tunnels.js new file mode 100644 index 00000000..37c4be64 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/tunnels.js @@ -0,0 +1,14 @@ +// Collapses the nested connections array to a count and stamps the account id +// from the scoped object onto every row. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((tunnel) => ({ + sourceId: tunnel.id, + tunnelName: tunnel.name, + accountId: accountId, + status: tunnel.status || "", + tunnelType: tunnel.tun_type || "", + activeConnections: (tunnel.connections || []).length, + createdOn: tunnel.created_at, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/turnstileChallenges.js b/plugins/Cloudflare/v2/dataStreams/scripts/turnstileChallenges.js new file mode 100644 index 00000000..b95030d8 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/turnstileChallenges.js @@ -0,0 +1,39 @@ +// dataStreams/scripts/turnstileChallenges.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the breakdown value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.eventType vs dimensions.action). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. +// +// Cloudflare answers a failed GraphQL query with HTTP 200 and a populated `errors` array, +// so the request never looks like a failure and the stream's `errorHandling` does not +// reliably fire on it. Check for it explicitly so a broken/over-wide query surfaces as a +// real error instead of silently shaping to zero rows. +const graphqlErrors = (data && data.errors) || []; +if (graphqlErrors.length) { + throw new Error( + "Cloudflare GraphQL error: " + + graphqlErrors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].turnstileAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + challenges: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/turnstileWidgets.js b/plugins/Cloudflare/v2/dataStreams/scripts/turnstileWidgets.js new file mode 100644 index 00000000..7ce07a05 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/turnstileWidgets.js @@ -0,0 +1,20 @@ +// The Turnstile sitekey is the widget's stable identifier and is globally +// unique, so it doubles as the sourceId. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((w) => ({ + sourceId: w.sitekey, + widgetName: w.name || w.sitekey, + accountId: accountId, + mode: w.mode || "", + region: w.region || "", + // Two columns, because the import serialises an array property to a JSON + // string and correlation can only compare scalars: `domains` is for display + // and `primaryDomain` is the join key for the Turnstile Widget -> Zone rule. + domains: (w.domains || []).join(", "), + primaryDomain: (w.domains || [])[0] || "", + botFightMode: Boolean(w.bot_fight_mode), + createdOn: w.created_on, + modifiedOn: w.modified_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/vectorizeIndexes.js b/plugins/Cloudflare/v2/dataStreams/scripts/vectorizeIndexes.js new file mode 100644 index 00000000..c218ecc4 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/vectorizeIndexes.js @@ -0,0 +1,19 @@ +// Index names are only unique within an account, so the account id from the +// scoped object is prefixed onto the name to form a globally-unique sourceId. +// Also flattens the nested config object (dimensions/metric). +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((idx) => { + const cfg = idx.config || {}; + return { + sourceId: `${accountId}:${idx.name}`, + indexName: idx.name, + accountId: accountId, + dimensions: + typeof cfg.dimensions === "number" ? cfg.dimensions : null, + metric: cfg.metric || "", + createdOn: idx.created_on, + modifiedOn: idx.modified_on, + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/workerBindings.js b/plugins/Cloudflare/v2/dataStreams/scripts/workerBindings.js new file mode 100644 index 00000000..a2b96a31 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/workerBindings.js @@ -0,0 +1,44 @@ +// Emits ONE row per binding, as its own object type. +// +// It deliberately does NOT reuse the Worker's sourceId/type: when two import +// steps write the same object, the later step REPLACES the property set rather +// than merging it, so writing Worker objects here silently wiped every property +// the workerScripts step had set (accountId, usageModel, createdOn, ...). +// +// Each binding carries a type-specific SCALAR id column, populated only for its +// own type. Correlation rules then match one column per target type - a missing +// or empty value never matches, so the rules stay precise without relying on +// array-valued property matching. +const worker = (context.objects && context.objects[0]) || {}; +const rawId = worker.rawId || ""; +const accountId = rawId.indexOf(":") > -1 ? rawId.split(":")[0] : ""; +const scriptName = worker.name || ""; +const bindings = (data && data.result && data.result.bindings) || []; + +result = bindings + .filter((b) => b && b.type) + .map((b) => { + const bindingName = b.name || b.type; + const isD1 = b.type === "d1" || b.type === "d1_database"; + return { + sourceId: `${accountId}:${scriptName}:${bindingName}`, + bindingName: bindingName, + bindingType: b.type, + scriptName: scriptName, + accountId: accountId, + // Exactly one of these is populated per row, keyed by binding type. + kvNamespaceId: + b.type === "kv_namespace" ? b.namespace_id || "" : "", + r2BucketName: b.type === "r2_bucket" ? b.bucket_name || "" : "", + d1DatabaseId: isD1 ? b.id || b.database_id || "" : "", + queueName: b.type === "queue" ? b.queue_name || "" : "", + durableObjectNamespaceId: + b.type === "durable_object_namespace" + ? b.namespace_id || "" + : "", + vectorizeIndexName: + b.type === "vectorize" ? b.index_name || "" : "", + hyperdriveConfigId: b.type === "hyperdrive" ? b.id || "" : "", + serviceName: b.type === "service" ? b.service || "" : "", + }; + }); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/workerRoutes.js b/plugins/Cloudflare/v2/dataStreams/scripts/workerRoutes.js new file mode 100644 index 00000000..adf36671 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/workerRoutes.js @@ -0,0 +1,23 @@ +// Routes are the join object between a Worker and the Zone it serves, so this +// stamps both sides' keys onto each row: zoneId from the scoped Zone object and +// scriptName from the route itself. A correlation Bridge rule then relates +// Worker -> Worker Route -> Zone. Routes with no script attached are dropped - +// they cannot participate in that relationship. +const zone = (context.objects && context.objects[0]) || {}; +const zoneId = zone.rawId || ""; +const zoneName = zone.name || ""; +// Graph properties can arrive as single-element arrays, so unwrap before use. +// accountId scopes the Worker Route -> Worker correlation to one account: two +// accounts can each hold a Worker with the same name. +const accountId = [].concat(zone.accountId || "")[0] || ""; + +result = ((data && data.result) || []) + .filter((route) => route && route.script) + .map((route) => ({ + sourceId: route.id, + pattern: route.pattern, + zoneId: zoneId, + zoneName: zoneName, + accountId: accountId, + scriptName: route.script, + })); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/workerScripts.js b/plugins/Cloudflare/v2/dataStreams/scripts/workerScripts.js new file mode 100644 index 00000000..02a2c78c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/workerScripts.js @@ -0,0 +1,17 @@ +// Build a globally-unique sourceId for each Worker script. +// Script names are only unique within an account, so the account id from the +// scoped object is prefixed onto the name. +const accountId = + (context.objects && context.objects[0] && context.objects[0].rawId) || ""; + +result = ((data && data.result) || []).map((script) => ({ + sourceId: `${accountId}:${script.id}`, + scriptName: script.id, + accountId: accountId, + usageModel: script.usage_model || "", + handlers: (script.handlers || []).join(", "), + placementMode: (script.placement && script.placement.mode) || "", + logpush: Boolean(script.logpush), + createdOn: script.created_on, + modifiedOn: script.modified_on, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/workersAiInference.js b/plugins/Cloudflare/v2/dataStreams/scripts/workersAiInference.js new file mode 100644 index 00000000..5cf1c49a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/workersAiInference.js @@ -0,0 +1,40 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/workersAiInference.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the breakdown value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.modelId vs dimensions.requestSource vs dimensions.errorCode). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen, and +// derive an average inference time per request (the API only returns a per-group total). + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.accounts && + data.data.viewer.accounts[0] && + data.data.viewer.accounts[0].aiInferenceAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + const requests = Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0; + const totalDurationMs = Number((row.sum && row.sum.totalInferenceTimeMs) || 0) || 0; + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + requests: requests, + inputTokens: Number((row.sum && row.sum.totalInputTokens) || 0) || 0, + outputTokens: Number((row.sum && row.sum.totalOutputTokens) || 0) || 0, + avgDurationMs: requests > 0 ? Math.round((totalDurationMs / requests) * 100) / 100 : 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneCertificates.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneCertificates.js new file mode 100644 index 00000000..1f63e602 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneCertificates.js @@ -0,0 +1,15 @@ +// Flattens each certificate pack's nested certificates[] array into one row +// per certificate, since the expiry date lives on the inner certificate, not +// the pack. +result = ((data && data.result) || []).flatMap((pack) => + (pack.certificates || []).map((cert) => ({ + id: cert.id, + hosts: (cert.hosts || pack.hosts || []).join(", "), + status: cert.status, + certificateAuthority: pack.certificate_authority, + type: pack.type, + validationMethod: pack.validation_method, + expiresOn: cert.expires_on, + issuer: cert.issuer, + })), +); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneDnsAnalytics.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneDnsAnalytics.js new file mode 100644 index 00000000..ec34883f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneDnsAnalytics.js @@ -0,0 +1,35 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/zoneDnsAnalytics.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.queryName vs dimensions.queryType vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].dnsAnalyticsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + queryCount: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0, + avgResponseTimeMs: Number((row.avg && row.avg.processingTimeUs) || 0) / 1000 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js new file mode 100644 index 00000000..bd7759ab --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js @@ -0,0 +1,38 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/zoneFirewallEvents.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the selected dimension's value inside each row's `dimensions` object varies +// with the user-selected breakdown (dimensions.ruleId vs dimensions.source vs ...). The +// `action` dimension is always present under a fixed key. Normalise both to stable +// columns regardless of which breakdown dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].firewallEventsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const breakdown = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + const rawAction = row.dimensions && row.dimensions.action; + const action = rawAction === undefined || rawAction === null || rawAction === "" ? "Unknown" : String(rawAction); + + return { + breakdown: breakdown, + action: action, + events: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneNelReports.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneNelReports.js new file mode 100644 index 00000000..5a654d74 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneNelReports.js @@ -0,0 +1,39 @@ +// dataStreams/scripts/zoneNelReports.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.type vs dimensions.phase vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. +// +// Cloudflare answers a failed GraphQL query (e.g. NEL not entitled on this zone's plan) +// with HTTP 200 and a populated top-level `errors` array. A postRequestScript bypasses +// the stream's declarative `errorHandling`, so without this check a genuine failure +// would silently shape to zero rows instead of surfacing as an error. +const graphqlErrors = data && Array.isArray(data.errors) ? data.errors : []; +if (graphqlErrors.length) { + throw new Error( + "Cloudflare GraphQL error: " + + graphqlErrors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].nelReportsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + events: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zonePageShield.js b/plugins/Cloudflare/v2/dataStreams/scripts/zonePageShield.js new file mode 100644 index 00000000..ac6a3b4d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zonePageShield.js @@ -0,0 +1,39 @@ +// dataStreams/scripts/zonePageShield.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.resourceType vs dimensions.urlHost vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. +// +// Cloudflare answers a failed GraphQL query (e.g. Page Shield not entitled on this +// zone's plan) with HTTP 200 and a populated top-level `errors` array. A postRequestScript +// bypasses the stream's declarative `errorHandling`, so without this check a genuine +// failure would silently shape to zero rows instead of surfacing as an error. +const graphqlErrors = data && Array.isArray(data.errors) ? data.errors : []; +if (graphqlErrors.length) { + throw new Error( + "Cloudflare GraphQL error: " + + graphqlErrors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].pageShieldReportsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + date: row.dimensions && row.dimensions.date, + breakdown: label, + events: Number(row.count !== undefined && row.count !== null ? row.count : 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneTrafficBreakdown.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneTrafficBreakdown.js new file mode 100644 index 00000000..0873816c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneTrafficBreakdown.js @@ -0,0 +1,35 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, and a +// postRequestScript bypasses the stream's declarative errorHandling entirely, +// so the error is raised here or it would be swallowed into an empty result. +if (data && data.errors && data.errors.length) { + throw new Error("Cloudflare GraphQL error: " + data.errors[0].message); +} + +// dataStreams/scripts/zoneTrafficBreakdown.js +// The GraphQL query interpolates {{breakdown}} into the dimensions selection, so the +// key holding the dimension value inside each row's `dimensions` object varies with the +// user-selected breakdown (dimensions.clientCountryName vs dimensions.cacheStatus vs ...). +// Normalise it to a stable `breakdown` column regardless of which dimension was chosen. + +const dimensionKey = context.config && context.config.breakdown; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].httpRequestsAdaptiveGroups) || + []; + +result = groups.map((row) => { + const rawValue = dimensionKey ? row.dimensions && row.dimensions[dimensionKey] : undefined; + const label = rawValue === undefined || rawValue === null || rawValue === "" ? "Unknown" : String(rawValue); + + return { + breakdown: label, + requests: Number((row.count !== undefined && row.count !== null ? row.count : 0)) || 0, + bytes: Number((row.sum && row.sum.edgeResponseBytes) || 0) || 0, + visits: Number((row.sum && row.sum.visits) || 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/streamCmcd.json b/plugins/Cloudflare/v2/dataStreams/streamCmcd.json new file mode 100644 index 00000000..faa8c66d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/streamCmcd.json @@ -0,0 +1,83 @@ +{ + "name": "streamCmcd", + "displayName": "Stream Playback Quality", + "description": "Daily playback quality metrics for a Cloudflare Stream video, grouped by a selectable dimension", + "tags": ["Media"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$videoId:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){streamCMCDAdaptiveGroups(limit:10000,filter:{videoId:$videoId,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count avg{bufferStarvationDuration initialBufferStarvationDuration encodedBitrate} dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "videoId": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "postRequestScript": "streamCmcd.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Stream Video"] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "country", + "options": [ + { "value": "country", "label": "Country" }, + { "value": "resolution", "label": "Resolution" }, + { "value": "streamType", "label": "Stream Type" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "sampleCount", + "displayName": "Sample Count", + "shape": "number" + }, + { + "name": "avgBufferingDurationMs", + "displayName": "Avg Buffering Duration", + "shape": "milliseconds", + "role": "value" + }, + { + "name": "avgStartupBufferingDurationMs", + "displayName": "Avg Startup Buffering Duration", + "shape": "milliseconds" + }, + { + "name": "avgEncodedBitrate", + "displayName": "Avg Encoded Bitrate", + "shape": "number" + } + ], + "timeframes": ["last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json b/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json new file mode 100644 index 00000000..2ad823cd --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json @@ -0,0 +1,49 @@ +{ + "name": "streamMinutesViewed", + "displayName": "Stream Minutes Viewed", + "description": "Daily minutes of video viewed for a Cloudflare Stream video", + "tags": ["Media"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$uid:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){streamMinutesViewedAdaptiveGroups(limit:10000,filter:{uid:$uid,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){dimensions{date}sum{minutesViewed}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "uid": "{{object.rawId}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.streamMinutesViewedAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Stream Video"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.minutesViewed", + "displayName": "Minutes Viewed", + "shape": "minutes", + "role": "value" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/streamVideos.json b/plugins/Cloudflare/v2/dataStreams/streamVideos.json new file mode 100644 index 00000000..5056f65a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/streamVideos.json @@ -0,0 +1,90 @@ +{ + "name": "streamVideos", + "displayName": "Stream Videos", + "description": "Cloudflare Stream videos in an account with their processing state and duration", + "tags": [ + "Media" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/stream", + "postRequestScript": "streamVideos.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "videoName", + "displayName": "Video", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Stream Video" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "statusState", + "displayName": "State", + "shape": "string" + }, + { + "name": "duration", + "displayName": "Duration", + "shape": "seconds" + }, + { + "name": "size", + "displayName": "Size", + "shape": "bytes" + }, + { + "name": "readyToStream", + "displayName": "Ready", + "shape": "boolean" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "preview", + "displayName": "Preview", + "shape": [ + "url", + { + "label": "Preview" + } + ] + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/tunnelConnections.json b/plugins/Cloudflare/v2/dataStreams/tunnelConnections.json new file mode 100644 index 00000000..854e8d45 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/tunnelConnections.json @@ -0,0 +1,61 @@ +{ + "name": "tunnelConnections", + "displayName": "Tunnel Connections", + "description": "Active connector connections for a Cloudflare Tunnel", + "tags": ["Network"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.accountId}}/cfd_tunnel/{{object.rawId}}/connections", + "postRequestScript": "tunnelConnections.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Tunnel"] } + }, + "metadata": [ + { + "name": "connectionId", + "displayName": "Connection ID", + "shape": "string", + "visible": false + }, + { + "name": "colo_name", + "displayName": "Colo", + "shape": "string", + "role": "label" + }, + { + "name": "origin_ip", + "displayName": "Origin IP", + "shape": "string" + }, + { + "name": "opened_at", + "displayName": "Opened", + "shape": "date", + "role": "timestamp" + }, + { + "name": "client_version", + "displayName": "Connector Version", + "shape": "string" + }, + { + "name": "arch", + "displayName": "Architecture", + "shape": "string" + }, + { + "name": "is_pending_reconnect", + "displayName": "Pending Reconnect", + "shape": "boolean" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/tunnels.json b/plugins/Cloudflare/v2/dataStreams/tunnels.json new file mode 100644 index 00000000..4f50895c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/tunnels.json @@ -0,0 +1,114 @@ +{ + "name": "tunnels", + "displayName": "Tunnels", + "description": "Cloudflare Tunnels in an account with their connection status", + "tags": [ + "Network" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/cfd_tunnel", + "getArgs": [ + { + "key": "is_deleted", + "value": "false" + } + ], + "postRequestScript": "tunnels.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "100" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "tunnelName", + "displayName": "Tunnel", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Tunnel" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "status", + "displayName": "Status", + "shape": [ + "state", + { + "map": { + "success": [ + "healthy" + ], + "warning": [ + "degraded", + "inactive" + ], + "error": [ + "down" + ] + } + } + ] + }, + { + "name": "tunnelType", + "displayName": "Type", + "shape": "string" + }, + { + "name": "activeConnections", + "displayName": "Active Connections", + "shape": "number" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/turnstileChallenges.json b/plugins/Cloudflare/v2/dataStreams/turnstileChallenges.json new file mode 100644 index 00000000..2bbfb144 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/turnstileChallenges.json @@ -0,0 +1,63 @@ +{ + "name": "turnstileChallenges", + "displayName": "Turnstile Challenges", + "description": "Turnstile challenge counts for a widget grouped by a selectable dimension", + "tags": ["Security"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$siteKey:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){turnstileAdaptiveGroups(limit:5000,filter:{siteKey:$siteKey,datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "siteKey": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "turnstileChallenges.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Turnstile Widget"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "eventType", + "options": [ + { "value": "eventType", "label": "Event Type" }, + { "value": "action", "label": "Action" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "challenges", + "displayName": "Challenges", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/turnstileWidgets.json b/plugins/Cloudflare/v2/dataStreams/turnstileWidgets.json new file mode 100644 index 00000000..5cf285e9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/turnstileWidgets.json @@ -0,0 +1,90 @@ +{ + "name": "turnstileWidgets", + "displayName": "Turnstile Widgets", + "description": "Turnstile widgets configured in an account with their mode and domains", + "tags": [ + "Security" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/challenges/widgets", + "postRequestScript": "turnstileWidgets.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "widgetName", + "displayName": "Widget", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Turnstile Widget" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "mode", + "displayName": "Mode", + "shape": "string" + }, + { + "name": "region", + "displayName": "Region", + "shape": "string" + }, + { + "name": "domains", + "displayName": "Domains", + "shape": "string" + }, + { + "name": "primaryDomain", + "displayName": "Primary Domain", + "shape": "string" + }, + { + "name": "botFightMode", + "displayName": "Bot Fight Mode", + "shape": "boolean" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Modified", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/vectorizeIndexes.json b/plugins/Cloudflare/v2/dataStreams/vectorizeIndexes.json new file mode 100644 index 00000000..95e349c4 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/vectorizeIndexes.json @@ -0,0 +1,48 @@ +{ + "name": "vectorizeIndexes", + "displayName": "Vectorize Indexes", + "description": "Vectorize vector database indexes in a Cloudflare account", + "tags": ["Database", "Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/vectorize/v2/indexes", + "postRequestScript": "vectorizeIndexes.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "visibility": { "type": "hidden" }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "indexName", + "displayName": "Index", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Vectorize Index" + }, + { "name": "accountId", "displayName": "Account ID", "shape": "string" }, + { + "name": "dimensions", + "displayName": "Dimensions", + "shape": "number" + }, + { "name": "metric", "displayName": "Metric", "shape": "string" }, + { "name": "createdOn", "displayName": "Created", "shape": "date" }, + { "name": "modifiedOn", "displayName": "Modified", "shape": "date" } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/vectorizeQueries.json b/plugins/Cloudflare/v2/dataStreams/vectorizeQueries.json new file mode 100644 index 00000000..d6a2748d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/vectorizeQueries.json @@ -0,0 +1,54 @@ +{ + "name": "vectorizeQueries", + "displayName": "Vectorize Queries", + "description": "Daily query count and query latency for a Vectorize index", + "tags": ["Database", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$indexName:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){vectorizeV2QueriesAdaptiveGroups(limit:10000,filter:{indexName:$indexName,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){count avg{requestDurationMs} dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "indexName": "{{object.name}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.vectorizeV2QueriesAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Vectorize Index"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "avg.requestDurationMs", + "displayName": "Avg Query Latency", + "shape": "milliseconds" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json b/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json new file mode 100644 index 00000000..bea67517 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json @@ -0,0 +1,54 @@ +{ + "name": "vectorizeStorage", + "displayName": "Vectorize Storage", + "description": "Daily stored vector count and dimensionality for a Vectorize index", + "tags": ["Database", "Storage"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$indexName:string,$start:Date,$end:Date){viewer{accounts(filter:{accountTag:$accountTag}){vectorizeV2StorageAdaptiveGroups(limit:10000,filter:{indexName:$indexName,date_geq:$start,date_leq:$end},orderBy:[date_ASC]){max{storedVectorDimensions vectorCount} dimensions{date}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "indexName": "{{object.name}}", + "start": "{{timeframe.start.split('T')[0]}}", + "end": "{{timeframe.end.split('T')[0]}}" + } + }, + "pathToData": "data.viewer.accounts.0.vectorizeV2StorageAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Vectorize Index"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.vectorCount", + "displayName": "Stored Vectors", + "shape": "number", + "role": "value" + }, + { + "name": "max.storedVectorDimensions", + "displayName": "Stored Vector Dimensions", + "shape": "number" + } + ], + "timeframes": ["last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/verifyToken.json b/plugins/Cloudflare/v2/dataStreams/verifyToken.json new file mode 100644 index 00000000..9c7528bc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/verifyToken.json @@ -0,0 +1,39 @@ +{ + "name": "verifyToken", + "displayName": "Token Status", + "description": "Status and expiry of the API token the plugin authenticates with", + "tags": ["Security"], + "baseDataSourceName": "httpRequestUnscoped", + "config": { + "httpMethod": "get", + "endpointPath": "user/tokens/verify", + "pathToData": "result", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": "none", + "visibility": { "type": "hidden" }, + "metadata": [ + { "name": "id", "displayName": "Token ID", "shape": "string" }, + { + "name": "status", + "displayName": "Status", + "shape": ["state", { "map": { "success": ["active"] } }] + }, + { + "name": "not_before", + "displayName": "Valid From", + "shape": "date" + }, + { + "name": "expires_on", + "displayName": "Expires On", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerBindings.json b/plugins/Cloudflare/v2/dataStreams/workerBindings.json new file mode 100644 index 00000000..dcf3f3fa --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerBindings.json @@ -0,0 +1,54 @@ +{ + "name": "workerBindings", + "displayName": "Worker Bindings", + "description": "Resources bound to a Worker script, such as KV namespaces, R2 buckets, D1 databases and queues", + "tags": ["Workers"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.accountId}}/workers/scripts/{{object.name}}/settings", + "postRequestScript": "workerBindings.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Worker"] } + }, + "visibility": { "type": "hidden" }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "bindingName", + "displayName": "Binding", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Worker Binding" + }, + { "name": "bindingType", "displayName": "Type", "shape": "string" }, + { "name": "scriptName", "displayName": "Worker", "shape": "string" }, + { "name": "accountId", "displayName": "Account ID", "shape": "string" }, + { "name": "kvNamespaceId", "visible": false, "shape": "string" }, + { "name": "r2BucketName", "visible": false, "shape": "string" }, + { "name": "d1DatabaseId", "visible": false, "shape": "string" }, + { "name": "queueName", "visible": false, "shape": "string" }, + { + "name": "durableObjectNamespaceId", + "visible": false, + "shape": "string" + }, + { "name": "vectorizeIndexName", "visible": false, "shape": "string" }, + { "name": "hyperdriveConfigId", "visible": false, "shape": "string" }, + { "name": "serviceName", "visible": false, "shape": "string" } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerInvocations.json b/plugins/Cloudflare/v2/dataStreams/workerInvocations.json new file mode 100644 index 00000000..16a6173f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerInvocations.json @@ -0,0 +1,106 @@ +{ + "name": "workerInvocations", + "displayName": "Worker Invocations", + "description": "Request, error and CPU time metrics for a Worker script", + "tags": [ + "Workers", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$scriptName:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){workersInvocationsAdaptive(limit:10000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){sum{requests errors subrequests}quantiles{cpuTimeP50 cpuTimeP99}dimensions{datetime status scriptName}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.accounts.0.workersInvocationsAdaptive", + "expandInnerObjects": true, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.errors", + "displayName": "Errors", + "shape": "number" + }, + { + "name": "sum.subrequests", + "displayName": "Subrequests", + "shape": "number" + }, + { + "name": "quantiles.cpuTimeP50", + "displayName": "CPU Time P50 (raw)", + "shape": "number", + "visible": false + }, + { + "name": "cpuTimeP50Ms", + "displayName": "CPU Time P50", + "computed": true, + "valueExpression": "{{ Number($['quantiles.cpuTimeP50']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "quantiles.cpuTimeP99", + "displayName": "CPU Time P99 (raw)", + "shape": "number", + "visible": false + }, + { + "name": "cpuTimeP99Ms", + "displayName": "CPU Time P99", + "computed": true, + "valueExpression": "{{ Number($['quantiles.cpuTimeP99']) / 1000 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + }, + { + "name": "dimensions.status", + "displayName": "Status", + "shape": "string" + }, + { + "name": "errorRate", + "displayName": "Error Rate", + "computed": true, + "valueExpression": "{{ Number($['sum.requests']) > 0 ? Math.round(10000 * Number($['sum.errors']) / Number($['sum.requests'])) / 100 : 0 }}", + "shape": ["percent", { "decimalPlaces": 2 }] + } + ], + "timeframes": [ + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} \ No newline at end of file diff --git a/plugins/Cloudflare/v2/dataStreams/workerRoutes.json b/plugins/Cloudflare/v2/dataStreams/workerRoutes.json new file mode 100644 index 00000000..8902f609 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerRoutes.json @@ -0,0 +1,47 @@ +{ + "name": "workerRoutes", + "displayName": "Worker Routes", + "description": "URL patterns that route requests on a zone to a Worker script", + "tags": ["Workers", "Zone"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "zones/{{object.rawId}}/workers/routes", + "postRequestScript": "workerRoutes.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "visibility": { "type": "hidden" }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "pattern", + "displayName": "Route", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Worker Route" + }, + { "name": "accountId", "displayName": "Account ID", "shape": "string" }, + { "name": "zoneId", "displayName": "Zone ID", "shape": "string" }, + { "name": "zoneName", "displayName": "Zone", "shape": "string" }, + { + "name": "scriptName", + "displayName": "Worker", + "shape": "string" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerScripts.json b/plugins/Cloudflare/v2/dataStreams/workerScripts.json new file mode 100644 index 00000000..32eeb657 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerScripts.json @@ -0,0 +1,85 @@ +{ + "name": "workerScripts", + "displayName": "Worker Scripts", + "description": "Worker scripts deployed in a Cloudflare account", + "tags": [ + "Workers" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "accounts/{{object.rawId}}/workers/scripts", + "postRequestScript": "workerScripts.js", + "paging": { + "mode": "none" + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "sourceId", + "displayName": "Source ID", + "shape": "string", + "role": "id" + }, + { + "name": "scriptName", + "displayName": "Worker", + "shape": "string", + "role": "label", + "sourceId": "sourceId", + "sourceType": "Cloudflare Worker" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string" + }, + { + "name": "usageModel", + "displayName": "Usage Model", + "shape": "string" + }, + { + "name": "handlers", + "displayName": "Handlers", + "shape": "string" + }, + { + "name": "placementMode", + "displayName": "Placement Mode", + "shape": "string" + }, + { + "name": "logpush", + "displayName": "Logpush", + "shape": "boolean" + }, + { + "name": "createdOn", + "displayName": "Created", + "shape": "date" + }, + { + "name": "modifiedOn", + "displayName": "Modified", + "shape": "date" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/workersAiInference.json b/plugins/Cloudflare/v2/dataStreams/workersAiInference.json new file mode 100644 index 00000000..209b68fc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workersAiInference.json @@ -0,0 +1,78 @@ +{ + "name": "workersAiInference", + "displayName": "Workers AI Inference", + "description": "Inference request counts, token usage and latency for Workers AI grouped by a selectable dimension", + "tags": ["Workers", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){aiInferenceAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count sum{totalInputTokens totalOutputTokens totalInferenceTimeMs}dimensions{date {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "workersAiInference.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "modelId", + "options": [ + { "value": "modelId", "label": "Model" }, + { "value": "requestSource", "label": "Request Source" }, + { "value": "errorCode", "label": "Error Code" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "inputTokens", + "displayName": "Input Tokens", + "shape": "number" + }, + { + "name": "outputTokens", + "displayName": "Output Tokens", + "shape": "number" + }, + { + "name": "avgDurationMs", + "displayName": "Avg Inference Time", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + } + ], + "timeframes": ["last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneCertificates.json b/plugins/Cloudflare/v2/dataStreams/zoneCertificates.json new file mode 100644 index 00000000..726cf382 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneCertificates.json @@ -0,0 +1,91 @@ +{ + "name": "zoneCertificates", + "displayName": "SSL Certificates", + "description": "SSL certificate packs for a Cloudflare zone with issuer, validation method and expiry details", + "tags": ["Zone", "Security"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "zones/{{object.rawId}}/ssl/certificate_packs", + "postRequestScript": "zoneCertificates.js", + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "50" + }, + "offset": { + "mode": "page", + "rowCountIn": { "realm": "payloadArraySize", "path": "result" }, + "base": 1 + }, + "out": { "realm": "queryArg", "path": "page" } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { "name": "hosts", "displayName": "Hosts", "shape": "string" }, + { + "name": "status", + "displayName": "Status", + "shape": [ + "state", + { + "map": { + "success": ["active", "deployed"], + "warning": [ + "pending_validation", + "pending_issuance", + "pending_deployment", + "pending_expiration", + "pending_deletion", + "initializing", + "deleting" + ], + "error": ["expired", "deleted"] + } + } + ] + }, + { + "name": "certificateAuthority", + "displayName": "Authority", + "shape": "string" + }, + { "name": "type", "displayName": "Type", "shape": "string" }, + { + "name": "validationMethod", + "displayName": "Validation Method", + "shape": "string" + }, + { + "name": "expiresOn", + "displayName": "Expires", + "shape": "date", + "role": "value" + }, + { + "name": "daysUntilExpiry", + "displayName": "Days Until Expiry", + "computed": true, + "valueExpression": "{{ Math.round((new Date($['expiresOn']) - new Date()) / 86400000) }}", + "shape": "number" + }, + { "name": "issuer", "displayName": "Issuer", "shape": "string" }, + { + "name": "id", + "displayName": "Certificate ID", + "shape": "string", + "visible": false + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneDnsAnalytics.json b/plugins/Cloudflare/v2/dataStreams/zoneDnsAnalytics.json new file mode 100644 index 00000000..5122ab86 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneDnsAnalytics.json @@ -0,0 +1,69 @@ +{ + "name": "zoneDnsAnalytics", + "displayName": "DNS Analytics", + "description": "DNS query counts and response times for a zone grouped by a selectable dimension", + "tags": ["Zone", "DNS"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){dnsAnalyticsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count avg{processingTimeUs} dimensions{date {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "zoneDnsAnalytics.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "queryName", + "options": [ + { "value": "queryName", "label": "Query Name" }, + { "value": "queryType", "label": "Query Type" }, + { "value": "responseCode", "label": "Response Code" }, + { "value": "coloName", "label": "Edge Location" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queryCount", + "displayName": "Query Count", + "shape": "number", + "role": "value" + }, + { + "name": "avgResponseTimeMs", + "displayName": "Avg Response Time", + "shape": "milliseconds" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneDnsRecords.json b/plugins/Cloudflare/v2/dataStreams/zoneDnsRecords.json new file mode 100644 index 00000000..38ca9ce5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneDnsRecords.json @@ -0,0 +1,64 @@ +{ + "name": "zoneDnsRecords", + "displayName": "DNS Records", + "description": "DNS records configured on a Cloudflare zone", + "tags": ["Zone", "DNS"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "zones/{{object.rawId}}/dns_records", + "pathToData": "result", + "paging": { + "mode": "offset", + "pageSize": { "realm": "queryArg", "path": "per_page", "value": "100" }, + "offset": { + "mode": "page", + "rowCountIn": { "realm": "payloadArraySize", "path": "result" }, + "base": 1 + }, + "out": { "realm": "queryArg", "path": "page" } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "id", + "displayName": "Record ID", + "shape": "string", + "role": "id", + "visible": false + }, + { + "name": "name", + "displayName": "Name", + "shape": "string", + "role": "label" + }, + { "name": "type", "displayName": "Type", "shape": "string" }, + { "name": "content", "displayName": "Content", "shape": "string" }, + { + "name": "ttl", + "displayName": "TTL", + "shape": "seconds", + "formatExpression": "{{ $['ttl'] === 1 ? 'Auto' : $['ttl'] }}" + }, + { "name": "proxied", "displayName": "Proxied", "shape": "boolean" }, + { "name": "comment", "displayName": "Comment", "shape": "string" }, + { + "name": "tags", + "displayName": "Tags", + "valueExpression": "{{ Array.isArray($['tags']) ? $['tags'].join(', ') : ($['tags'] || '') }}", + "shape": "string" + }, + { "name": "created_on", "displayName": "Created", "shape": "date" }, + { "name": "modified_on", "displayName": "Modified", "shape": "date" } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneFirewallEvents.json b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEvents.json new file mode 100644 index 00000000..3b2151c5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEvents.json @@ -0,0 +1,81 @@ +{ + "name": "zoneFirewallEvents", + "displayName": "Zone Firewall Events", + "description": "Firewall event counts for a zone grouped by action and a selectable dimension", + "tags": ["Zone", "Security"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){firewallEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{action {{breakdown}} }}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "zoneFirewallEvents.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "source", + "options": [ + { "value": "ruleId", "label": "Rule" }, + { "value": "source", "label": "Service" }, + { "value": "clientCountryName", "label": "Country" }, + { "value": "clientRequestHTTPHost", "label": "Host" }, + { "value": "userAgent", "label": "User Agent" }, + { "value": "clientRequestPath", "label": "Path" } + ] + } + ], + "metadata": [ + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "action", + "displayName": "Action", + "shape": "string" + }, + { + "name": "actionState", + "displayName": "Severity", + "computed": true, + "valueExpression": "{{ $['action'] }}", + "shape": [ + "state", + { + "map": { + "error": ["block", "drop"], + "warning": ["challenge", "managed_challenge", "jschallenge"], + "success": ["allow", "skip", "log"] + } + } + ] + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json b/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json new file mode 100644 index 00000000..aa04d660 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json @@ -0,0 +1,87 @@ +{ + "name": "zoneHealthCheckEvents", + "displayName": "Health Check Events", + "description": "Individual health check pass/fail events for a zone, with origin, region and latency detail", + "tags": ["Zone", "Availability"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){healthCheckEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){count avg{rttMs}dimensions{datetime healthCheckName healthCheckId healthStatus healthChanged failureReason region originIP}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.zones.0.healthCheckEventsAdaptiveGroups", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "dimensions.healthCheckName", + "displayName": "Health Check", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.healthStatus", + "displayName": "Status", + "shape": "string" + }, + { + "name": "dimensions.healthChanged", + "displayName": "Status Changed", + "shape": "number" + }, + { + "name": "dimensions.failureReason", + "displayName": "Failure Reason", + "shape": "string" + }, + { + "name": "dimensions.region", + "displayName": "Region", + "shape": "string" + }, + { + "name": "dimensions.originIP", + "displayName": "Origin IP", + "shape": "string" + }, + { + "name": "count", + "displayName": "Event Count", + "shape": "number", + "role": "value" + }, + { + "name": "avg.rttMs", + "displayName": "Avg Round Trip Time", + "shape": "milliseconds" + }, + { + "name": "dimensions.healthCheckId", + "displayName": "Health Check ID", + "shape": "string", + "visible": false + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneHealthChecks.json b/plugins/Cloudflare/v2/dataStreams/zoneHealthChecks.json new file mode 100644 index 00000000..f69012cf --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneHealthChecks.json @@ -0,0 +1,87 @@ +{ + "name": "zoneHealthChecks", + "displayName": "Health Checks", + "description": "Standalone health check results for a zone", + "tags": ["Zone", "Availability"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "zones/{{object.rawId}}/healthchecks", + "pathToData": "result", + "paging": { + "mode": "offset", + "pageSize": { "realm": "queryArg", "path": "per_page", "value": "50" }, + "offset": { + "mode": "page", + "rowCountIn": { "realm": "payloadArraySize", "path": "result" }, + "base": 1 + }, + "out": { "realm": "queryArg", "path": "page" } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "name", + "displayName": "Name", + "shape": "string", + "role": "label" + }, + { "name": "address", "displayName": "Address", "shape": "string" }, + { "name": "type", "displayName": "Type", "shape": "string" }, + { + "name": "status", + "displayName": "Status", + "shape": [ + "state", + { + "map": { + "success": ["healthy"], + "error": ["unhealthy"], + "warning": ["suspended", "unknown"] + } + } + ] + }, + { + "name": "failure_reason", + "displayName": "Failure Reason", + "shape": "string" + }, + { "name": "suspended", "displayName": "Suspended", "shape": "boolean" }, + { "name": "interval", "displayName": "Interval", "shape": "seconds" }, + { "name": "timeout", "displayName": "Timeout", "shape": "seconds" }, + { + "name": "consecutive_fails", + "displayName": "Consecutive Fails", + "shape": "number" + }, + { + "name": "consecutive_successes", + "displayName": "Consecutive Successes", + "shape": "number" + }, + { + "name": "check_regions", + "displayName": "Regions", + "valueExpression": "{{ Array.isArray($['check_regions']) ? $['check_regions'].join(', ') : ($['check_regions'] || '') }}", + "shape": "string" + }, + { + "name": "id", + "displayName": "Health Check ID", + "shape": "string", + "visible": false + }, + { "name": "created_on", "displayName": "Created", "shape": "date" }, + { "name": "modified_on", "displayName": "Modified", "shape": "date" } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneLoadBalancing.json b/plugins/Cloudflare/v2/dataStreams/zoneLoadBalancing.json new file mode 100644 index 00000000..27919ee9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneLoadBalancing.json @@ -0,0 +1,59 @@ +{ + "name": "zoneLoadBalancing", + "displayName": "Load Balancing Requests", + "description": "Load balancer request counts for a zone broken down by load balancer, selected pool, origin and colo", + "tags": ["Zone", "Network"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){loadBalancingRequestsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{lbName selectedPoolName selectedOriginName coloCode}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.zones.0.loadBalancingRequestsAdaptiveGroups", + "expandInnerObjects": true, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "dimensions.lbName", + "displayName": "Load Balancer", + "shape": "string", + "role": "label" + }, + { + "name": "dimensions.selectedPoolName", + "displayName": "Pool", + "shape": "string" + }, + { + "name": "dimensions.selectedOriginName", + "displayName": "Origin", + "shape": "string" + }, + { + "name": "dimensions.coloCode", + "displayName": "Colo", + "shape": "string" + }, + { + "name": "count", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last12hours", "last24hours"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneNelReports.json b/plugins/Cloudflare/v2/dataStreams/zoneNelReports.json new file mode 100644 index 00000000..a8746d0c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneNelReports.json @@ -0,0 +1,64 @@ +{ + "name": "zoneNelReports", + "displayName": "Network Error Logs", + "description": "Browser-reported network errors for a zone grouped by a selectable dimension", + "tags": ["Zone", "Availability"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){nelReportsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "zoneNelReports.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "type", + "options": [ + { "value": "type", "label": "Error Type" }, + { "value": "phase", "label": "Phase" }, + { "value": "clientIPCountry", "label": "Country" }, + { "value": "lastKnownGoodColoCode", "label": "Edge Location" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zonePageShield.json b/plugins/Cloudflare/v2/dataStreams/zonePageShield.json new file mode 100644 index 00000000..3f7d91d9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zonePageShield.json @@ -0,0 +1,64 @@ +{ + "name": "zonePageShield", + "displayName": "Page Shield Reports", + "description": "Page Shield script and connection monitoring events for a zone grouped by a selectable dimension", + "tags": ["Zone", "Security"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){pageShieldReportsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[date_ASC]){count dimensions{date {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "zonePageShield.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "resourceType", + "options": [ + { "value": "resourceType", "label": "Resource Type" }, + { "value": "urlHost", "label": "Resource Host" }, + { "value": "cspDirective", "label": "CSP Directive" }, + { "value": "action", "label": "Action" } + ] + } + ], + "metadata": [ + { + "name": "date", + "displayName": "Date", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json b/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json new file mode 100644 index 00000000..79c35676 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json @@ -0,0 +1,97 @@ +{ + "name": "zoneTraffic", + "displayName": "Zone Traffic", + "description": "Hourly HTTP request, cache and bandwidth totals for a zone", + "tags": [ + "Zone", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){httpRequests1hGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_ASC]){dimensions{datetime}sum{requests cachedRequests bytes cachedBytes threats pageViews encryptedRequests}uniq{uniques}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "pathToData": "data.viewer.zones.0.httpRequests1hGroups", + "expandInnerObjects": true, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.cachedRequests", + "displayName": "Cached Requests", + "shape": "number" + }, + { + "name": "sum.bytes", + "displayName": "Bytes", + "shape": "bytes" + }, + { + "name": "sum.cachedBytes", + "displayName": "Cached Bytes", + "shape": "bytes" + }, + { + "name": "sum.threats", + "displayName": "Threats", + "shape": "number" + }, + { + "name": "sum.pageViews", + "displayName": "Page Views", + "shape": "number" + }, + { + "name": "sum.encryptedRequests", + "displayName": "Encrypted Requests", + "shape": "number" + }, + { + "name": "uniq.uniques", + "displayName": "Unique Visitors", + "shape": "number" + }, + { + "name": "cacheHitRatio", + "displayName": "Cache Hit Ratio", + "computed": true, + "valueExpression": "{{ Number($['sum.requests']) > 0 ? Math.round(10000 * Number($['sum.cachedRequests']) / Number($['sum.requests'])) / 100 : 0 }}", + "shape": ["percent", { "decimalPlaces": 2 }] + } + ], + "timeframes": [ + "last12hours", + "last24hours" + ] +} \ No newline at end of file diff --git a/plugins/Cloudflare/v2/dataStreams/zoneTrafficBreakdown.json b/plugins/Cloudflare/v2/dataStreams/zoneTrafficBreakdown.json new file mode 100644 index 00000000..ec1c4176 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneTrafficBreakdown.json @@ -0,0 +1,71 @@ +{ + "name": "zoneTrafficBreakdown", + "displayName": "Zone Traffic Breakdown", + "description": "HTTP request counts, bytes and visits for a zone grouped by a selectable dimension", + "tags": ["Zone", "Analytics"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:Time!,$end:Time!){viewer{zones(filter:{zoneTag:$zoneTag}){httpRequestsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count sum{edgeResponseBytes visits} dimensions{ {{breakdown}} }}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "zoneTrafficBreakdown.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "clientCountryName", + "options": [ + { "value": "clientCountryName", "label": "Country" }, + { "value": "edgeResponseStatus", "label": "Status Code" }, + { "value": "cacheStatus", "label": "Cache Status" }, + { "value": "clientRequestHTTPHost", "label": "Host" }, + { "value": "clientDeviceType", "label": "Device Type" }, + { "value": "clientRequestHTTPProtocol", "label": "HTTP Protocol" }, + { "value": "edgeResponseContentTypeName", "label": "Content Type" } + ] + } + ], + "metadata": [ + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "bytes", + "displayName": "Bytes", + "shape": "bytes" + }, + { + "name": "visits", + "displayName": "Visits", + "shape": "number" + } + ], + "timeframes": ["last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zones.json b/plugins/Cloudflare/v2/dataStreams/zones.json new file mode 100644 index 00000000..6be346f5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zones.json @@ -0,0 +1,166 @@ +{ + "name": "zones", + "displayName": "Zones", + "description": "Cloudflare zones with their status, plan and owning account", + "tags": [ + "Zone" + ], + "baseDataSourceName": "httpRequestUnscoped", + "config": { + "httpMethod": "get", + "endpointPath": "zones", + "pathToData": "result", + "expandInnerObjects": true, + "paging": { + "mode": "offset", + "pageSize": { + "realm": "queryArg", + "path": "per_page", + "value": "50" + }, + "offset": { + "mode": "page", + "rowCountIn": { + "realm": "payloadArraySize", + "path": "result" + }, + "base": 1 + }, + "out": { + "realm": "queryArg", + "path": "page" + } + }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": "none", + "visibility": { + "type": "hidden" + }, + "metadata": [ + { + "name": "id", + "displayName": "Zone ID", + "shape": "string", + "role": "id" + }, + { + "name": "name", + "displayName": "Zone", + "shape": "string", + "role": "label", + "sourceId": "id", + "sourceType": "Cloudflare Zone" + }, + { + "name": "status", + "displayName": "Status", + "shape": [ + "state", + { + "map": { + "success": [ + "active" + ], + "warning": [ + "pending", + "initializing", + "read only" + ], + "error": [ + "moved", + "deactivated", + "deleted" + ] + } + } + ] + }, + { + "name": "paused", + "displayName": "Paused", + "shape": "boolean" + }, + { + "name": "type", + "displayName": "Zone Type", + "shape": "string" + }, + { + "name": "development_mode", + "visible": false, + "shape": "number" + }, + { + "name": "developmentModeActive", + "displayName": "Development Mode", + "computed": true, + "valueExpression": "{{ Number($['development_mode']) > 0 }}", + "shape": "boolean" + }, + { + "name": "account.id", + "visible": false, + "shape": "string" + }, + { + "name": "account.name", + "visible": false, + "shape": "string" + }, + { + "name": "plan.name", + "visible": false, + "shape": "string" + }, + { + "name": "accountId", + "displayName": "Account ID", + "computed": true, + "valueExpression": "{{ $['account.id'] }}", + "shape": "string" + }, + { + "name": "accountName", + "displayName": "Account", + "computed": true, + "valueExpression": "{{ $['account.name'] }}", + "shape": "string" + }, + { + "name": "planName", + "displayName": "Plan", + "computed": true, + "valueExpression": "{{ $['plan.name'] }}", + "shape": "string" + }, + { + "name": "created_on", + "displayName": "Created", + "shape": "date" + }, + { + "name": "activated_on", + "displayName": "Activated", + "shape": "date" + }, + { + "name": "name_servers", + "displayName": "Name Servers", + "shape": "string", + "visible": false + }, + { + "name": "nameServers", + "displayName": "Name Servers", + "computed": true, + "shape": "string", + "valueExpression": "{{ $['name_servers'].split('\"').join('').split('[').join('').split(']').join('').split(',').join(', ') }}" + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/defaultContent/AI/aiGateway.dash.json b/plugins/Cloudflare/v2/defaultContent/AI/aiGateway.dash.json new file mode 100644 index 00000000..c7c6ced7 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/AI/aiGateway.dash.json @@ -0,0 +1,830 @@ +{ + "name": "AI Gateway", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "750b8a80-1d88-4579-87de-53c872f78d7d", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "83e8fc2c-7fc7-4e76-99d7-d696efb05946", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Total Tokens", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.totalTokens" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.totalTokens_sum", + "comparisonColumn": "none", + "label": "Total Tokens" + } + } + } + } + }, + { + "i": "3f547967-d776-4c34-aede-977429b6bc1c", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cost", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.cost" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.cost_sum", + "comparisonColumn": "none", + "label": "Cost" + } + } + } + } + }, + { + "i": "9014c501-a75a-47ca-ad4c-9248b8900e74", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayErrors]}}", + "name": "aiGatewayErrors", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Errors" + } + } + } + } + }, + { + "i": "d04df137-5984-4f36-869e-24b826dbda12", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "596b3e4e-5047-4106-8ba3-6214968a0092", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "804101b6-6e18-4bde-a722-85704e429865", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Model", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "d4b539e2-5477-4a17-a133-c594e0218ebc", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Provider", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "provider" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "c54a8c5c-6710-45ff-a7c4-ca9855b11a38", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Token Usage", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.tokensIn" + ] + }, + { + "type": "sum", + "names": [ + "sum.tokensOut" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.tokensIn_sum", + "sum.tokensOut_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "da515089-5536-40dc-a44d-8e01c9f9a720", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Request Duration Percentiles", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayRequests]}}", + "name": "aiGatewayRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "quantiles.durationMsP50" + ] + }, + { + "type": "mean", + "names": [ + "quantiles.durationMsP95" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "quantiles.durationMsP50_mean", + "quantiles.durationMsP95_mean" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "3623cdf1-bff6-4d83-96af-d1a77db0d783", + "x": 0, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Errors by Model", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayErrors]}}", + "name": "aiGatewayErrors", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "model" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "3f461a5f-7623-44f1-8970-284b111aa2f3", + "x": 2, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[aiGatewayCache]}}", + "name": "aiGatewayCache", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "cacheStatus", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AI Gateway]}}" + }, + "variables": [ + "{{variables.[Cloudflare AI Gateway]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "cacheStatus_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/AI/autorag.dash.json b/plugins/Cloudflare/v2/defaultContent/AI/autorag.dash.json new file mode 100644 index 00000000..b0f32b57 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/AI/autorag.dash.json @@ -0,0 +1,595 @@ +{ + "name": "AutoRAG", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "36c46ca5-8a89-4987-9a1a-494b88743857", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Search Events", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Search Events" + } + } + } + } + }, + { + "i": "9531a84a-921d-4920-b327-7c408cf980c4", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AI Searches", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.aiSearchCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.aiSearchCount_sum", + "comparisonColumn": "none", + "label": "AI Searches" + } + } + } + } + }, + { + "i": "3d2a39c2-64de-4fe8-9669-b6da7ece7062", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Searches", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.searchCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.searchCount_sum", + "comparisonColumn": "none", + "label": "Searches" + } + } + } + } + }, + { + "i": "2c2c7223-38f1-4895-9c89-86c1139991f5", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Embedding Models", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "embeddingModel" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "breakdown" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "breakdown_distinctCount", + "comparisonColumn": "none", + "label": "Embedding Models" + } + } + } + } + }, + { + "i": "77ebd440-1d19-4eb4-9984-0d2f45525a77", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AutoRAG Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "58851ad7-7a43-4494-ac09-dbb9f32a22be", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "912ec506-a20c-40ca-aa18-dabdb216190d", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries by Search Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "9631c0b4-694a-4f1c-9344-b12bedfd19bc", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries by Embedding Model", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "embeddingModel" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "1a9bb402-64cb-41de-bbf9-e68dc8b2ce59", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AI Searches and Searches Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[autoragQueries]}}", + "name": "autoragQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "searchType" + }, + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.aiSearchCount" + ] + }, + { + "type": "sum", + "names": [ + "sum.searchCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare AutoRAG]}}" + }, + "variables": [ + "{{variables.[Cloudflare AutoRAG]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.aiSearchCount_sum", + "sum.searchCount_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/AI/manifest.json b/plugins/Cloudflare/v2/defaultContent/AI/manifest.json new file mode 100644 index 00000000..caf9ab6f --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/AI/manifest.json @@ -0,0 +1,16 @@ +{ + "items": [ + { + "name": "vectorizeIndex", + "type": "dashboard" + }, + { + "name": "aiGateway", + "type": "dashboard" + }, + { + "name": "autorag", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/AI/vectorizeIndex.dash.json b/plugins/Cloudflare/v2/defaultContent/AI/vectorizeIndex.dash.json new file mode 100644 index 00000000..61a33755 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/AI/vectorizeIndex.dash.json @@ -0,0 +1,484 @@ +{ + "name": "Vectorize Index", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "758ee019-0ad4-4cbd-9c9e-3d63373bb102", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeQueries]}}", + "name": "vectorizeQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Queries" + } + } + } + } + }, + { + "i": "ca765fe6-5d33-483c-a478-00031af1eaa5", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg Query Latency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeQueries]}}", + "name": "vectorizeQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.requestDurationMs" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avg.requestDurationMs_mean", + "comparisonColumn": "none", + "label": "Avg Query Latency" + } + } + } + } + }, + { + "i": "a3605dd6-c981-45c3-915b-52441a1a7f74", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stored Vectors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeStorage]}}", + "name": "vectorizeStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.vectorCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.vectorCount_max", + "comparisonColumn": "none", + "label": "Stored Vectors" + } + } + } + } + }, + { + "i": "07770f5c-bc7b-4e78-9ea5-2f059c967680", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Vector Dimensions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeStorage]}}", + "name": "vectorizeStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.storedVectorDimensions" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.storedVectorDimensions_max", + "comparisonColumn": "none", + "label": "Vector Dimensions" + } + } + } + } + }, + { + "i": "91c841e0-e59c-4142-883b-1bd3024c73be", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Index Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "2807ff07-c2c8-4bc9-a73d-ee3b4db7eefd", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeQueries]}}", + "name": "vectorizeQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "80f34a72-0101-4f51-8c9b-adea02e01bd8", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Query Latency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeQueries]}}", + "name": "vectorizeQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.requestDurationMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "avg.requestDurationMs_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "01fd151e-a4ea-4f50-b458-5f4ab2c0cdfc", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stored Vectors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeStorage]}}", + "name": "vectorizeStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.vectorCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Vectorize Index]}}" + }, + "variables": [ + "{{variables.[Cloudflare Vectorize Index]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "max.vectorCount_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/containerApplication.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/containerApplication.dash.json new file mode 100644 index 00000000..77e29bf2 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/containerApplication.dash.json @@ -0,0 +1,669 @@ +{ + "name": "Container Application", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "e64676a0-67f4-4630-834f-d501d77c507f", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg CPU Utilization", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgCpuUtilization" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avgCpuUtilization_mean", + "comparisonColumn": "none", + "label": "Avg CPU Utilization" + } + } + } + } + }, + { + "i": "dfa0e14c-6d1a-4fe6-b721-ef8744d09608", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg Memory Usage", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgMemory" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avgMemory_mean", + "comparisonColumn": "none", + "label": "Avg Memory Usage" + } + } + } + } + }, + { + "i": "426c6724-0bf9-4f84-abd8-e2a64c6e637e", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Received", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sumRxBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sumRxBytes_sum", + "comparisonColumn": "none", + "label": "Bytes Received" + } + } + } + } + }, + { + "i": "63b496af-5b0f-449a-9d42-86878b20ae2f", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Transmitted", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sumTxBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sumTxBytes_sum", + "comparisonColumn": "none", + "label": "Bytes Transmitted" + } + } + } + } + }, + { + "i": "badc57c3-fbc9-4562-85ab-b338812f1db9", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Application Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "99aa195b-b61b-4203-bcbb-80986a924f73", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "CPU Utilization Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgCpuUtilization" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "avgCpuUtilization_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "0bbdce17-1f27-4899-9aa5-75c3ac58e6d0", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Memory Usage Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgMemory" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "avgMemory_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "25402b1b-0bff-4143-8458-785b85d4adbb", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Network Traffic", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sumRxBytes" + ] + }, + { + "type": "sum", + "names": [ + "sumTxBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "sumRxBytes_sum", + "sumTxBytes_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "7128c134-17ab-4263-8885-971edabba81f", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "CPU Utilization by Region", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "region" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgCpuUtilization" + ] + } + ] + }, + "sort": { + "by": [ + [ + "avgCpuUtilization_mean", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "avgCpuUtilization_mean" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "2d8456d9-65a9-4c19-83ec-86806c99a217", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Samples by Process Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[containerMetrics]}}", + "name": "containerMetrics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "procType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Container Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Container Application]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/durableObjectNamespace.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/durableObjectNamespace.dash.json new file mode 100644 index 00000000..cb0ee505 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/durableObjectNamespace.dash.json @@ -0,0 +1,645 @@ +{ + "name": "Durable Object Namespace", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "a786755f-c56a-4ca8-9fb2-39f56cd20e31", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "cb4fcabf-dc89-4232-a781-9c19611252be", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.errors" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.errors_sum", + "comparisonColumn": "none", + "label": "Errors" + } + } + } + } + }, + { + "i": "0d30e560-ae94-463d-9ded-b8fbdf5159f0", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Wall Time P99", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "wallTimeP99Ms" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "wallTimeP99Ms_max", + "comparisonColumn": "none", + "label": "Wall Time P99" + } + } + } + } + }, + { + "i": "d8b61347-3327-434c-afe1-9f8b50e171a9", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Storage Size", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectStorage]}}", + "name": "durableObjectStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.storedBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.storedBytes_max", + "comparisonColumn": "none", + "label": "Storage Size" + } + } + } + } + }, + { + "i": "922f325e-0310-4554-ba44-047abe041585", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Namespace Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "b79735b7-97f5-41e6-9c78-3bd0ec38f2a9", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests and Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + }, + { + "type": "sum", + "names": [ + "sum.errors" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byDay", + "yAxisColumn": [ + "sum.requests_sum", + "sum.errors_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "6cf4d972-b6ed-4483-a65c-d5321fb45b96", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Wall Time Percentiles", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "wallTimeP50Ms" + ] + }, + { + "type": "max", + "names": [ + "wallTimeP90Ms" + ] + }, + { + "type": "max", + "names": [ + "wallTimeP99Ms" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byDay", + "yAxisColumn": [ + "wallTimeP50Ms_max", + "wallTimeP90Ms_max", + "wallTimeP99Ms_max" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "f332ae67-843b-4f3e-b11a-b4dee654faef", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectInvocations]}}", + "name": "durableObjectInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.status", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sum.requests_sum", + "labelColumn": "dimensions.status_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "5f15f55e-adb8-448f-a49a-c2d3dd5c4a1d", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Storage Size", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectStorage]}}", + "name": "durableObjectStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.storedBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "max.storedBytes_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "502b9595-01fe-4ec7-a24b-cd6e47c44225", + "x": 0, + "y": 11, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Uncached Subrequest Body Size", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectSubrequests]}}", + "name": "durableObjectSubrequests", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requestBodySizeUncached" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Durable Object Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare Durable Object Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byDay", + "yAxisColumn": [ + "sum.requestBodySizeUncached_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/manifest.json b/plugins/Cloudflare/v2/defaultContent/Compute/manifest.json new file mode 100644 index 00000000..e3e17018 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/manifest.json @@ -0,0 +1,28 @@ +{ + "items": [ + { + "name": "worker", + "type": "dashboard" + }, + { + "name": "pagesProject", + "type": "dashboard" + }, + { + "name": "durableObjectNamespace", + "type": "dashboard" + }, + { + "name": "queue", + "type": "dashboard" + }, + { + "name": "containerApplication", + "type": "dashboard" + }, + { + "name": "pipeline", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/pagesProject.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/pagesProject.dash.json new file mode 100644 index 00000000..1a0fa291 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/pagesProject.dash.json @@ -0,0 +1,309 @@ +{ + "name": "Pages Project", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "24e8166d-ea90-45bf-a4de-8df7dd9033a3", + "x": 0, + "y": 0, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Project Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pages Project]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "62a4eba1-b082-4a4d-b8d3-7bb6f3bab970", + "x": 2, + "y": 0, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Latest Deployments", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesDeployments]}}", + "name": "pagesDeployments", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "created_on", + "desc" + ] + ], + "top": 8 + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pages Project]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "short_id", + "stateColumn": "status", + "sublabel": "branch", + "linkColumn": "none", + "columns": 4 + } + } + } + } + }, + { + "i": "92727f98-b5b9-42ec-b67c-6872f87afbe2", + "x": 0, + "y": 3, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Deployments by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesDeployments]}}", + "name": "pagesDeployments", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "status", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pages Project]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count", + "labelColumn": "status_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "6dec82d4-05e1-4196-abd9-01ff6537d2b3", + "x": 2, + "y": 3, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Deployments by Environment", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesDeployments]}}", + "name": "pagesDeployments", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "environment", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pages Project]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count", + "labelColumn": "environment_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "f5f618a9-bf99-4fee-b0e9-b1d8ac9d4c98", + "x": 0, + "y": 6, + "w": 4, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Deployment History", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesDeployments]}}", + "name": "pagesDeployments", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "created_on", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pages Project]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pages Project]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "created_on", + "short_id", + "environment", + "status", + "branch", + "commitMessage", + "url" + ], + "hiddenColumns": [ + "stage", + "commit" + ] + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/pipeline.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/pipeline.dash.json new file mode 100644 index 00000000..70980886 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/pipeline.dash.json @@ -0,0 +1,484 @@ +{ + "name": "Pipeline", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "2d40ce01-f6ee-42df-acb1-5d371a8ff3d9", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Records Ingested", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingestedRecords" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.ingestedRecords_sum", + "comparisonColumn": "none", + "label": "Records Ingested" + } + } + } + } + }, + { + "i": "8aa7942a-4ce0-477b-90b1-d382bd2bb275", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Ingested", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingestedBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.ingestedBytes_sum", + "comparisonColumn": "none", + "label": "Bytes Ingested" + } + } + } + } + }, + { + "i": "e2bbd68e-ebfc-4bde-800a-47e740c262c8", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Ingestion Operations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Ingestion Operations" + } + } + } + } + }, + { + "i": "a079e54c-c4d7-4236-8483-94ecdf0ac8b6", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Daily Records", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "sum.ingestedRecords" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.ingestedRecords_max", + "comparisonColumn": "none", + "label": "Peak Daily Records" + } + } + } + } + }, + { + "i": "df863625-6b8f-44b4-8a64-c5018500637c", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pipeline Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "a0d7a2e9-ad48-4b53-8bc6-67a76630f405", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Records Ingested Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingestedRecords" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.ingestedRecords_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "a5f002a3-649b-4dfe-bf12-de06f89826b8", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Ingested Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingestedBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.ingestedBytes_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "44658838-c03d-40a8-a720-a4d5fe42e078", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Ingestion Operations Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pipelineIngestion]}}", + "name": "pipelineIngestion", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Pipeline]}}" + }, + "variables": [ + "{{variables.[Cloudflare Pipeline]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/queue.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/queue.dash.json new file mode 100644 index 00000000..25bc734b --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/queue.dash.json @@ -0,0 +1,620 @@ +{ + "name": "Queue", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "0c25a196-d3d7-4945-aab7-a08f510790aa", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Message Operations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Message Operations" + } + } + } + } + }, + { + "i": "9c61aaea-eacc-46aa-a072-eed3aab9cdca", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Billable Operations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.billableOperations" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.billableOperations_sum", + "comparisonColumn": "none", + "label": "Billable Operations" + } + } + } + } + }, + { + "i": "d6623bf7-9039-4a45-8cb0-156767366d77", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Processed", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.bytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.bytes_sum", + "comparisonColumn": "none", + "label": "Bytes Processed" + } + } + } + } + }, + { + "i": "168c58fe-418a-416f-b086-075fcd059da7", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Average Backlog", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueBacklog]}}", + "name": "queueBacklog", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.messages" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avg.messages_mean", + "comparisonColumn": "none", + "label": "Average Backlog" + } + } + } + } + }, + { + "i": "32d2ad5e-db49-434d-9176-023fbd0da69b", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queue Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "cad9a0ff-d149-46a2-aa27-8d10eee737da", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Backlog", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueBacklog]}}", + "name": "queueBacklog", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetimeHour", + "byHour" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.messages" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetimeHour_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetimeHour_byHour", + "yAxisColumn": [ + "avg.messages_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "2d7beb77-32be-4243-9636-0af143ad80c9", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Operations by Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.actionType", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.actionType_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "9a3fa9e9-3dec-4c02-966a-505a537b2f36", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Operation Outcomes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.outcome", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.outcome_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "5ba07096-3905-4a6d-872e-60cc09ded22b", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Message Lag Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueMessageOperations]}}", + "name": "queueMessageOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetimeHour", + "byHour" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.lagTime" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetimeHour_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetimeHour_byHour", + "yAxisColumn": [ + "avg.lagTime_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "496dac59-2c8d-41aa-a882-818cd6d36d70", + "x": 0, + "y": 11, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Consumer Concurrency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueConsumerMetrics]}}", + "name": "queueConsumerMetrics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.concurrency" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Queue]}}" + }, + "variables": [ + "{{variables.[Cloudflare Queue]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "avg.concurrency_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Compute/worker.dash.json b/plugins/Cloudflare/v2/defaultContent/Compute/worker.dash.json new file mode 100644 index 00000000..64abe644 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/worker.dash.json @@ -0,0 +1,495 @@ +{ + "name": "Worker", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "33449361-5fba-44c2-acf9-a2d93dbc965d", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "5e2b36e7-3b7c-483e-9d70-616f6cff6f5d", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.errors" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.errors_sum", + "comparisonColumn": "none", + "label": "Errors" + } + } + } + } + }, + { + "i": "83e50375-26f8-41be-9bcd-06d9e524535c", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Subrequests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.subrequests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.subrequests_sum", + "comparisonColumn": "none", + "label": "Subrequests" + } + } + } + } + }, + { + "i": "66fc75ed-e3b8-4ff2-823e-395620d34ef8", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak CPU Time P99", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "cpuTimeP99Ms" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "cpuTimeP99Ms_max", + "comparisonColumn": "none", + "label": "Peak CPU Time P99" + } + } + } + } + }, + { + "i": "a983183c-4266-487b-aee8-9bf5744a2511", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "63e94747-153e-48ef-890d-0715068f0a6f", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests and Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + }, + { + "type": "sum", + "names": [ + "sum.errors" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "sum.requests_sum", + "sum.errors_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "f33635f4-95d8-4be4-ae07-89a39e533326", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "CPU Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "cpuTimeP50Ms" + ] + }, + { + "type": "max", + "names": [ + "cpuTimeP99Ms" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "cpuTimeP50Ms_max", + "cpuTimeP99Ms_max" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "73f51ba3-4dae-499c-8c26-5fbaf6c9c9fa", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Invocations by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerInvocations]}}", + "name": "workerInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.status", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sum.requests_sum", + "labelColumn": "dimensions.status_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Core/account.dash.json b/plugins/Cloudflare/v2/defaultContent/Core/account.dash.json new file mode 100644 index 00000000..4dd20781 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Core/account.dash.json @@ -0,0 +1,2952 @@ +{ + "name": "Account", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "3bb95490-9698-407a-9dca-511995fe1ebb", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerScripts]}}", + "name": "workerScripts", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Workers" + } + } + } + } + }, + { + "i": "eb1d6ac1-f3e8-4935-a262-59e02fac22ad", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Projects", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesProjects]}}", + "name": "pagesProjects", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Pages Projects" + } + } + } + } + }, + { + "i": "c206f73b-e9dd-4c97-8de6-153be439f5be", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Tunnels", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnels]}}", + "name": "tunnels", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Tunnels" + } + } + } + } + }, + { + "i": "7f158dbb-3a69-4c68-995e-756e6d6a7d07", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "R2 Buckets", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Buckets]}}", + "name": "r2Buckets", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "R2 Buckets" + } + } + } + } + }, + { + "i": "fbb27de7-9d74-4de5-aed2-8b347947c7e5", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Account Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "041c7858-722a-4e36-9e17-fa44ab609ea1", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Tunnels", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnels]}}", + "name": "tunnels", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "tunnelName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "tunnelName", + "stateColumn": "status", + "sublabel": "tunnelType", + "linkColumn": "tunnelName", + "columns": 2 + } + } + } + } + }, + { + "i": "5c67e20d-99f0-4dab-b8c6-13a5f0fdf92b", + "x": 0, + "y": 5, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerScripts]}}", + "name": "workerScripts", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "scriptName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "scriptName", + "usageModel", + "handlers", + "placementMode", + "modifiedOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "logpush", + "createdOn" + ] + } + } + } + } + }, + { + "i": "075c1543-3d1f-4d74-a658-dc6e19575764", + "x": 2, + "y": 5, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Projects", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesProjects]}}", + "name": "pagesProjects", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "projectName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "projectName", + "latestDeploymentStatus", + "productionBranch", + "domains", + "latestDeploymentOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "subdomain", + "createdOn" + ] + } + } + } + } + }, + { + "i": "7b5a1c5b-ad5d-4cee-b6fa-4210171976e8", + "x": 0, + "y": 9, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "R2 Buckets", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Buckets]}}", + "name": "r2Buckets", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "bucketName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "bucketName", + "location", + "storageClass", + "createdOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId" + ] + } + } + } + } + }, + { + "i": "65d57e58-56be-42b5-86cc-735ef92fa7d8", + "x": 2, + "y": 9, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "KV Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvNamespaces]}}", + "name": "kvNamespaces", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "namespaceTitle", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "namespaceTitle", + "supportsUrlEncoding" + ], + "hiddenColumns": [ + "sourceId", + "accountId" + ] + } + } + } + } + }, + { + "i": "70461624-c21e-4501-9244-23a15edd4add", + "x": 0, + "y": 13, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "D1 Databases", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Databases]}}", + "name": "d1Databases", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "databaseName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "databaseName", + "numTables", + "fileSize", + "version", + "createdOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId" + ] + } + } + } + } + }, + { + "i": "c25cb5ba-cd50-4a90-8871-b99f8c57bcf7", + "x": 2, + "y": 13, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queues", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queues]}}", + "name": "queues", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "queueName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "queueName", + "producers", + "consumers", + "modifiedOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "createdOn" + ] + } + } + } + } + }, + { + "i": "cd0f4644-c131-45c5-aef2-0ec8d91ca62e", + "x": 0, + "y": 17, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Load Balancer Pools", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPools]}}", + "name": "loadBalancerPools", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "poolName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "poolName", + "enabled", + "originCount", + "minimumOrigins", + "modifiedOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "monitorId", + "createdOn" + ] + } + } + } + } + }, + { + "i": "f342d86a-84d2-4dec-999c-ef0c39f94870", + "x": 2, + "y": 17, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Access Applications", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessApps]}}", + "name": "accessApps", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "appName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "appName", + "appType", + "domain", + "sessionDuration", + "appLauncherVisible" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "createdOn", + "modifiedOn" + ] + } + } + } + } + }, + { + "i": "83f57d60-3e02-40dd-8ab5-9ca6bed4fea9", + "x": 0, + "y": 21, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Durable Object Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectNamespaces]}}", + "name": "durableObjectNamespaces", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "namespaceName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "namespaceName", + "scriptName", + "className", + "usesSqlite" + ], + "hiddenColumns": [ + "sourceId", + "accountId" + ] + } + } + } + } + }, + { + "i": "2336e698-182b-4dc7-83bf-5d104c88eead", + "x": 2, + "y": 21, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Vectorize Indexes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[vectorizeIndexes]}}", + "name": "vectorizeIndexes", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "indexName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "indexName", + "dimensions", + "metric", + "createdOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "modifiedOn" + ] + } + } + } + } + }, + { + "i": "7c8fd8d9-542a-4665-9621-e7ed1b8583b7", + "x": 0, + "y": 25, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Hyperdrive Configs", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveConfigs]}}", + "name": "hyperdriveConfigs", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "configName", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "configName", + "database", + "host", + "scheme" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "cachingDisabled" + ] + } + } + } + } + }, + { + "i": "d7931877-849c-421d-88e5-c5a83d107ce4", + "x": 0, + "y": 29, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway DNS Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayDnsQueries]}}", + "name": "gatewayDnsQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "resolverDecision" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "queryCount_sum", + "comparisonColumn": "none", + "label": "Gateway DNS Queries" + } + } + } + } + }, + { + "i": "6d0c0f83-1c51-43b7-90f1-1ec4226b8d2a", + "x": 1, + "y": 29, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway HTTP Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayHttpRequests]}}", + "name": "gatewayHttpRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "requests_sum", + "comparisonColumn": "none", + "label": "Gateway HTTP Requests" + } + } + } + } + }, + { + "i": "0e7ae631-b894-4f67-a73a-b9e61ce540f9", + "x": 2, + "y": 29, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AI Inference Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workersAiInference]}}", + "name": "workersAiInference", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "modelId" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "requests_sum", + "comparisonColumn": "none", + "label": "AI Inference Requests" + } + } + } + } + }, + { + "i": "685debee-fe22-4057-be74-f16010314596", + "x": 3, + "y": 29, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AI Output Tokens", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workersAiInference]}}", + "name": "workersAiInference", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "modelId" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "outputTokens" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "outputTokens_sum", + "comparisonColumn": "none", + "label": "AI Output Tokens" + } + } + } + } + }, + { + "i": "2edd6feb-b28c-455a-bb9b-8abdbbf04638", + "x": 0, + "y": 31, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway DNS Queries by Decision", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayDnsQueries]}}", + "name": "gatewayDnsQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "resolverDecision" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "queryCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "queryCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "fab0220c-a177-4a16-8d9b-a9bb5ebbd0fb", + "x": 2, + "y": 31, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Gateway DNS Categories", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayDnsQueries]}}", + "name": "gatewayDnsQueries", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "categoryNames" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "queryCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "queryCount_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "daad39ca-4ae3-437e-a2a4-657f660e6045", + "x": 0, + "y": 34, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway HTTP Requests by Action", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayHttpRequests]}}", + "name": "gatewayHttpRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "requests_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "7fe5da45-cb35-4c2b-98db-58e08a5bbbcd", + "x": 2, + "y": 34, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Gateway Hosts", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayHttpRequests]}}", + "name": "gatewayHttpRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "httpHost" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "requests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "ac748a4a-ca7b-4b10-a2c0-50936b00e9d7", + "x": 0, + "y": 37, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway Network Sessions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayNetworkSessions]}}", + "name": "gatewayNetworkSessions", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sessionCount" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sessionCount_sum", + "comparisonColumn": "none", + "label": "Gateway Network Sessions" + } + } + } + } + }, + { + "i": "ae5e51c8-183b-4518-958e-422eafc1779e", + "x": 0, + "y": 39, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway Network Sessions by Action", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayNetworkSessions]}}", + "name": "gatewayNetworkSessions", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sessionCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sessionCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sessionCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "cb3540f5-b6f5-4596-9555-b9ee9a2b8792", + "x": 0, + "y": 42, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Gateway HTTP Requests Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[gatewayHttpRequests]}}", + "name": "gatewayHttpRequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "requests_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "6ebe2742-9444-4be7-9edc-1c5b1e113633", + "x": 2, + "y": 42, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers AI Requests by Model", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workersAiInference]}}", + "name": "workersAiInference", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "modelId" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "requests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "e3b25cc5-489a-4604-96ce-d49e3ee5b6e6", + "x": 0, + "y": 45, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers AI Token Usage", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workersAiInference]}}", + "name": "workersAiInference", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "modelId" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "inputTokens" + ] + }, + { + "type": "sum", + "names": [ + "outputTokens" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "inputTokens_sum", + "outputTokens_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "2d7e5b1b-394e-4111-91de-2aa319f7fea8", + "x": 2, + "y": 45, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers AI Inference Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workersAiInference]}}", + "name": "workersAiInference", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "modelId" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgDurationMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "avgDurationMs_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "a38a89d8-b533-4bef-bbbb-3bfefb3f44ba", + "x": 0, + "y": 48, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Audit Log Actions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[auditLogs]}}", + "name": "auditLogs", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "actionType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "actionCount" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "actionCount_sum", + "comparisonColumn": "none", + "label": "Audit Log Actions" + } + } + } + } + }, + { + "i": "885088db-eba0-4a67-a170-c12c84b61c3c", + "x": 1, + "y": 48, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Image Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[imagesRequests]}}", + "name": "imagesRequests", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "requests_sum", + "comparisonColumn": "none", + "label": "Image Requests" + } + } + } + } + }, + { + "i": "33b7c30d-8dea-42a1-96d8-a885c9119f0a", + "x": 2, + "y": 48, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Image Transformations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[imagesTransformations]}}", + "name": "imagesTransformations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "transformations" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "transformations_sum", + "comparisonColumn": "none", + "label": "Image Transformations" + } + } + } + } + }, + { + "i": "b6731e3d-91a3-4ead-9685-7df79e235ce0", + "x": 3, + "y": 48, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Function Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesFunctionsInvocations]}}", + "name": "pagesFunctionsInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Pages Function Requests" + } + } + } + } + }, + { + "i": "463aafc7-e7fe-483a-9415-135d591794ab", + "x": 0, + "y": 50, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Audit Log Actions Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[auditLogs]}}", + "name": "auditLogs", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "actionType" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "actionCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "actionCount_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "b674edbe-1b30-41b5-a4fa-08bf7ad4ffb5", + "x": 2, + "y": 50, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Audit Log Actions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[auditLogs]}}", + "name": "auditLogs", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "actionType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "actionCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "actionCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "actionCount_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "ed67a1f0-321c-48e0-98da-937932cbe709", + "x": 0, + "y": 53, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Image Requests Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[imagesRequests]}}", + "name": "imagesRequests", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "requests_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "f1b12eaa-907d-4268-8481-fad2f24f707a", + "x": 2, + "y": 53, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Image Transformations Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[imagesTransformations]}}", + "name": "imagesTransformations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "transformations" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "transformations_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "a43ecf79-6372-4f65-bec5-d9e8c925d643", + "x": 0, + "y": 56, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Functions Requests and Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesFunctionsInvocations]}}", + "name": "pagesFunctionsInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + }, + { + "type": "sum", + "names": [ + "sum.errors" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byDay", + "yAxisColumn": [ + "sum.requests_sum", + "sum.errors_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "76b7293c-87ef-41eb-97c3-3633f59732de", + "x": 2, + "y": 56, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Pages Functions by Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[pagesFunctionsInvocations]}}", + "name": "pagesFunctionsInvocations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.scriptName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.scriptName_uniqueValues", + "yAxisData": [ + "sum.requests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "18fdde70-9cd8-4d1b-8b5c-0b06ccd397cd", + "x": 0, + "y": 59, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Browser Rendering Session Duration", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[browserRendering]}}", + "name": "browserRendering", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientLibrary" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "durationMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "durationMs_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "b7a3742d-41bb-42f0-8588-22ae18ba6cc3", + "x": 2, + "y": 59, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Browser Rendering Sessions by Client Library", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[browserRendering]}}", + "name": "browserRendering", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientLibrary" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "sessionId" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sessionId_distinctCount", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "sessionId_distinctCount" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "36b11ab5-9da0-456f-8056-cfb27f386542", + "x": 0, + "y": 62, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Firewall Queries Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[dnsFirewallAnalytics]}}", + "name": "dnsFirewallAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "responseCode" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queries" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "queries_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "876b9baa-c52d-4f4a-8cdd-8f8d5d490a58", + "x": 2, + "y": 62, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Firewall Queries by Response Code", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[dnsFirewallAnalytics]}}", + "name": "dnsFirewallAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "responseCode" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queries" + ] + } + ] + }, + "sort": { + "by": [ + [ + "queries_sum", + "desc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Account]}}" + }, + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "queries_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Core/manifest.json b/plugins/Cloudflare/v2/defaultContent/Core/manifest.json new file mode 100644 index 00000000..7b59b59d --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Core/manifest.json @@ -0,0 +1,12 @@ +{ + "items": [ + { + "name": "account", + "type": "dashboard" + }, + { + "name": "zone", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Core/zone.dash.json b/plugins/Cloudflare/v2/defaultContent/Core/zone.dash.json new file mode 100644 index 00000000..abc908d6 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Core/zone.dash.json @@ -0,0 +1,3006 @@ +{ + "name": "Zone", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "dbbd193c-5a10-4b49-8a2b-f33b1fe54efe", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "359ed863-1182-4dea-8299-3ed8a3b75b22", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Unique Visitors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "uniq.uniques" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "uniq.uniques_sum", + "comparisonColumn": "none", + "label": "Unique Visitors" + } + } + } + } + }, + { + "i": "1cac5d62-0609-4166-9ead-ba20f448f830", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bandwidth", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.bytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.bytes_sum", + "comparisonColumn": "none", + "label": "Bandwidth" + } + } + } + } + }, + { + "i": "2d0590e9-4c6b-460d-8919-c2658524e750", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Threats", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.threats" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.threats_sum", + "comparisonColumn": "none", + "label": "Threats" + } + } + } + } + }, + { + "i": "a73efcb0-71d7-4148-91c5-56edd3518568", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zone Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "4b177d07-939f-4a35-9b5b-d47d7cad13c8", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime", + "yAxisColumn": [ + "sum.requests", + "sum.cachedRequests" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "2b949c2a-6bd1-480b-8b02-78ae669d7be4", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bandwidth", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime", + "yAxisColumn": [ + "sum.bytes", + "sum.cachedBytes" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "2ce8c81d-92e5-4e30-b1fb-95a45e1c567d", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache Hit Ratio", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTraffic]}}", + "name": "zoneTraffic", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime", + "yAxisColumn": [ + "cacheHitRatio" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "8a7c2e43-e5a1-4fb8-a862-3bf8ec9f364d", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic by Country", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientCountryName" + }, + "sort": { + "by": [ + [ + "requests", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown", + "yAxisData": [ + "requests" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "babb40cf-e759-4887-8474-8649bfc1a846", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic by Status Code", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "edgeResponseStatus" + }, + "sort": { + "by": [ + [ + "requests", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "requests", + "labelColumn": "breakdown", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "5c613d78-1252-432a-b699-9064fe5625bc", + "x": 0, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "cacheStatus" + }, + "sort": { + "by": [ + [ + "requests", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "requests", + "labelColumn": "breakdown", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "fb685bc2-f0f1-4d13-b965-4852d361d7bc", + "x": 2, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic by Device Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientDeviceType" + }, + "sort": { + "by": [ + [ + "requests", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "requests", + "labelColumn": "breakdown", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "b5b428c0-6e8b-4b20-8637-826523d8875e", + "x": 0, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Events by Rule", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEvents]}}", + "name": "zoneFirewallEvents", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "ruleId" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "events_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "f70d4a4d-aa25-436e-bc2d-f57913923742", + "x": 2, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Events by Service", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEvents]}}", + "name": "zoneFirewallEvents", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "source" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "events_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "ab07298c-beb2-45ad-ab55-973b5ee13c9e", + "x": 0, + "y": 17, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Events by Country", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEvents]}}", + "name": "zoneFirewallEvents", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientCountryName" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "events_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "36980a5b-9966-4da8-b4ae-03a64c40c648", + "x": 2, + "y": 17, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Actions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEvents]}}", + "name": "zoneFirewallEvents", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "source" + }, + "group": { + "by": [ + [ + "action", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "events_sum", + "labelColumn": "action_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "6084f30d-d547-4fdf-8712-6ac71b5fb03a", + "x": 0, + "y": 20, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "SSL Certificates", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneCertificates]}}", + "name": "zoneCertificates", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "daysUntilExpiry", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "hosts", + "status", + "daysUntilExpiry", + "expiresOn", + "certificateAuthority", + "type" + ], + "hiddenColumns": [ + "id", + "issuer", + "validationMethod" + ] + } + } + } + } + }, + { + "i": "b32501ab-3b1e-47da-bb9c-19fab121891f", + "x": 2, + "y": 20, + "w": 2, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Health Checks", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneHealthChecks]}}", + "name": "zoneHealthChecks", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "name", + "status", + "address", + "type", + "failure_reason", + "suspended" + ], + "hiddenColumns": [ + "id", + "interval", + "timeout", + "consecutive_fails", + "consecutive_successes", + "check_regions", + "created_on", + "modified_on" + ] + } + } + } + } + }, + { + "i": "2a5caeac-bbae-4322-934c-4a58f34091f0", + "x": 0, + "y": 24, + "w": 4, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Records", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneDnsRecords]}}", + "name": "zoneDnsRecords", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "name", + "type", + "content", + "proxied", + "ttl", + "comment" + ], + "hiddenColumns": [ + "id", + "tags", + "created_on", + "modified_on" + ] + } + } + } + } + }, + { + "i": "4340f0d4-7cb2-495e-a086-4b115ac7eede", + "x": 0, + "y": 28, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Load Balancing by Pool", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneLoadBalancing]}}", + "name": "zoneLoadBalancing", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.selectedPoolName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.selectedPoolName_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "d0c74ae9-3aca-4708-a4a1-373db8a88696", + "x": 2, + "y": 28, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Load Balancing by Origin", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneLoadBalancing]}}", + "name": "zoneLoadBalancing", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.selectedOriginName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.selectedOriginName_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "99e46b39-b7fd-4d39-8990-7bfec62f4a92", + "x": 0, + "y": 31, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "LCP (P75)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "largestContentfulPaintP75" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "largestContentfulPaintP75_mean", + "comparisonColumn": "none", + "label": "LCP (P75)" + } + } + } + } + }, + { + "i": "5817c6a0-7759-4c3a-93a8-dfce7f44fc97", + "x": 1, + "y": 31, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "INP (P75)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "interactionToNextPaintP75" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "interactionToNextPaintP75_mean", + "comparisonColumn": "none", + "label": "INP (P75)" + } + } + } + } + }, + { + "i": "3681fbe9-0fb2-449b-85c3-f66e81c37fe3", + "x": 2, + "y": 31, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "CLS (P75)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "cumulativeLayoutShiftP75" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "cumulativeLayoutShiftP75_mean", + "comparisonColumn": "none", + "label": "CLS (P75)" + } + } + } + } + }, + { + "i": "865ade66-66ea-441f-a6d0-27a3d8a7f26d", + "x": 3, + "y": 31, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "RUM Samples", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "RUM Samples" + } + } + } + } + }, + { + "i": "0f48a7c9-fcf3-416a-b2f0-d6c2e5cabcc1", + "x": 0, + "y": 33, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Core Web Vitals Trend", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "largestContentfulPaintP75" + ] + }, + { + "type": "mean", + "names": [ + "interactionToNextPaintP75" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "largestContentfulPaintP75_mean", + "interactionToNextPaintP75_mean" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "1448aa66-c33d-42c8-b310-aab9100ef8a2", + "x": 2, + "y": 33, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cumulative Layout Shift Trend", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumWebVitals]}}", + "name": "rumWebVitals", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "cumulativeLayoutShiftP75" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "cumulativeLayoutShiftP75_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "3fa5456b-67bc-4f54-b2f7-9f20cad1aa50", + "x": 0, + "y": 36, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Page Views by Country", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumPageLoads]}}", + "name": "rumPageLoads", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "countryName" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "pageViews" + ] + } + ] + }, + "sort": { + "by": [ + [ + "pageViews_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "pageViews_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "b46fbd5f-b49c-40e6-9780-39fd9d287f6c", + "x": 2, + "y": 36, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Page Views by Device Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumPageLoads]}}", + "name": "rumPageLoads", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "deviceType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "pageViews" + ] + } + ] + }, + "sort": { + "by": [ + [ + "pageViews_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "pageViews_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "736448a6-7b52-440a-b866-f2f4b23ab048", + "x": 0, + "y": 39, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Page Views and Visits", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumPageLoads]}}", + "name": "rumPageLoads", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "countryName" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "pageViews" + ] + }, + { + "type": "sum", + "names": [ + "visits" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "pageViews_sum", + "visits_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "bba8874b-de16-4088-ba86-f7a3f1242e6e", + "x": 0, + "y": 42, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Queries by Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneDnsAnalytics]}}", + "name": "zoneDnsAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "queryType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "queryCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "queryCount_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "c8c8b28e-1fed-4543-87d6-821ef74a884b", + "x": 2, + "y": 42, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Response Codes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneDnsAnalytics]}}", + "name": "zoneDnsAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "responseCode" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "queryCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "queryCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "bb2d2cdd-d041-435a-b77f-47ef0f8190b8", + "x": 0, + "y": 45, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Queries Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneDnsAnalytics]}}", + "name": "zoneDnsAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "queryType" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "queryCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "queryCount_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "78551a25-ceca-4256-9111-1e195d3afa3b", + "x": 2, + "y": 45, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DNS Response Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneDnsAnalytics]}}", + "name": "zoneDnsAnalytics", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "queryType" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgResponseTimeMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "avgResponseTimeMs_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "5a35c781-2682-4880-bff7-77c61d52ae5f", + "x": 0, + "y": 48, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Email Routing Messages by Action", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[emailRouting]}}", + "name": "emailRouting", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "messageCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "messageCount_sum", + "desc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "messageCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "e7ec1705-838a-4d37-918b-496b4da2e138", + "x": 2, + "y": 48, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Email Routing Messages Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[emailRouting]}}", + "name": "emailRouting", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "status" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "messageCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "messageCount_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "404f3e25-56a7-4f0d-b112-e9c12846d0bb", + "x": 0, + "y": 51, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "DMARC Messages by Disposition", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[dmarcReports]}}", + "name": "dmarcReports", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "disposition" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "messageCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "messageCount_sum", + "desc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "messageCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "f741cb88-09ec-49d5-afac-2e55358ec1c9", + "x": 2, + "y": 51, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top DMARC Sending Organizations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[dmarcReports]}}", + "name": "dmarcReports", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "sourceOrgName" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "messageCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "messageCount_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "messageCount_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "d2d06e16-5181-4c42-9faf-f5eb6986072f", + "x": 0, + "y": 54, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache Reserve Operations by Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[cacheReserveOperations]}}", + "name": "cacheReserveOperations", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "operationClass" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "operationCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "operationCount_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "operationCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "2072f98c-365b-4001-9594-eed5b5612479", + "x": 2, + "y": 54, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache Reserve Storage", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[cacheReserveStorage]}}", + "name": "cacheReserveStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.storedBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "max.storedBytes_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "d1d83606-df02-4ee0-88ad-4b88401340ad", + "x": 0, + "y": 57, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Health Check Events by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneHealthCheckEvents]}}", + "name": "zoneHealthCheckEvents", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.healthStatus", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "timeframe": "last24hours", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.healthStatus_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "18a14576-aa42-440d-8f32-28024ebb0003", + "x": 2, + "y": 57, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Health Check Round Trip Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneHealthCheckEvents]}}", + "name": "zoneHealthCheckEvents", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.rttMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "timeframe": "last24hours", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "avg.rttMs_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "0b37e21b-6c6a-4442-8a58-507f77fb6451", + "x": 0, + "y": 60, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Network Error Logging by Error Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneNelReports]}}", + "name": "zoneNelReports", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "type" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ], + "top": 10 + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "events_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "60c857c2-28a9-47cf-b0aa-85676a291c9f", + "x": 2, + "y": 60, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Page Shield Events by Resource Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zonePageShield]}}", + "name": "zonePageShield", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "resourceType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "events" + ] + } + ] + }, + "sort": { + "by": [ + [ + "events_sum", + "desc" + ] + ] + } + }, + "timeframe": "last7days", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "events_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Media/manifest.json b/plugins/Cloudflare/v2/defaultContent/Media/manifest.json new file mode 100644 index 00000000..4a18653d --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Media/manifest.json @@ -0,0 +1,12 @@ +{ + "items": [ + { + "name": "streamVideo", + "type": "dashboard" + }, + { + "name": "realtimeApp", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Media/realtimeApp.dash.json b/plugins/Cloudflare/v2/defaultContent/Media/realtimeApp.dash.json new file mode 100644 index 00000000..ad05b110 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Media/realtimeApp.dash.json @@ -0,0 +1,500 @@ +{ + "name": "Realtime App", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "5b09fae2-8a34-4207-b2f9-e086b11a9bda", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Sent", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.egressBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.egressBytes_sum", + "comparisonColumn": "none", + "label": "Bytes Sent" + } + } + } + } + }, + { + "i": "e337f997-f243-4bd0-bb7a-c744a75ee5bb", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Received", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingressBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.ingressBytes_sum", + "comparisonColumn": "none", + "label": "Bytes Received" + } + } + } + } + }, + { + "i": "9989bf6a-9c82-4322-82a4-5de34f6e2d15", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Track Types", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "dimensions.trackType" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "dimensions.trackType_distinctCount", + "comparisonColumn": "none", + "label": "Track Types" + } + } + } + } + }, + { + "i": "173404ee-57ff-4d6e-a115-d6dbb62909a1", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Track Daily Sent", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "sum.egressBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.egressBytes_max", + "comparisonColumn": "none", + "label": "Peak Track Daily Sent" + } + } + } + } + }, + { + "i": "436da462-ed14-4ed8-8e35-4397b5628ce7", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "App Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "a06aa244-d7c9-4318-9736-8f90ec7e91cb", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.egressBytes" + ] + }, + { + "type": "sum", + "names": [ + "sum.ingressBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.egressBytes_sum", + "sum.ingressBytes_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "17c9fb0f-268e-436c-a6c5-352f265bf3e0", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Sent by Track Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.trackType", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.egressBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.egressBytes_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sum.egressBytes_sum", + "labelColumn": "dimensions.trackType_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "98a69785-4f4b-4f15-9aec-16bdbe6e6061", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bytes Received by Track Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[realtimeUsage]}}", + "name": "realtimeUsage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.trackType", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.ingressBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.ingressBytes_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Realtime App]}}" + }, + "variables": [ + "{{variables.[Cloudflare Realtime App]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.trackType_uniqueValues", + "yAxisData": [ + "sum.ingressBytes_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Media/streamVideo.dash.json b/plugins/Cloudflare/v2/defaultContent/Media/streamVideo.dash.json new file mode 100644 index 00000000..78e813ec --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Media/streamVideo.dash.json @@ -0,0 +1,668 @@ +{ + "name": "Stream Video", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "f577dc2e-deb3-4d64-b341-862bbf4e1f96", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Minutes Viewed", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamMinutesViewed]}}", + "name": "streamMinutesViewed", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.minutesViewed" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.minutesViewed_sum", + "comparisonColumn": "none", + "label": "Minutes Viewed" + } + } + } + } + }, + { + "i": "ee74e4f5-55c4-4304-8fe4-6e77b1f6a821", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Playback Samples", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "country" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sampleCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sampleCount_sum", + "comparisonColumn": "none", + "label": "Playback Samples" + } + } + } + } + }, + { + "i": "03038bcb-803b-43ab-8714-7e392a253705", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg Buffering", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "country" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgBufferingDurationMs" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avgBufferingDurationMs_mean", + "comparisonColumn": "none", + "label": "Avg Buffering" + } + } + } + } + }, + { + "i": "67460204-3b8f-47d5-814c-efd43b15c299", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg Startup Buffering", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "country" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgStartupBufferingDurationMs" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avgStartupBufferingDurationMs_mean", + "comparisonColumn": "none", + "label": "Avg Startup Buffering" + } + } + } + } + }, + { + "i": "3767d07d-5760-4518-96b2-41216cabfc84", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Video Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "a091d752-74b8-4b00-b270-5368127b22e1", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Minutes Viewed", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamMinutesViewed]}}", + "name": "streamMinutesViewed", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.minutesViewed" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.minutesViewed_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "e2c8a36e-61ef-4276-bf55-36cf8c20ddf6", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Buffering by Country", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "country" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgBufferingDurationMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "avgBufferingDurationMs_mean", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "avgBufferingDurationMs_mean" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "85ff9eb6-7d96-4adc-9143-a260fccd0b0f", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Playback Samples by Resolution", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "resolution" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sampleCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sampleCount_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sampleCount_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "93bba344-431c-4f6f-891d-f0cc35861386", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Encoded Bitrate by Stream Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "streamType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgEncodedBitrate" + ] + } + ] + }, + "sort": { + "by": [ + [ + "avgEncodedBitrate_mean", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "avgEncodedBitrate_mean" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "3e6c4bba-6800-4622-b3bd-b3b8e0dca3d6", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Buffering Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[streamCmcd]}}", + "name": "streamCmcd", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "country" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avgBufferingDurationMs" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Stream Video]}}" + }, + "variables": [ + "{{variables.[Cloudflare Stream Video]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "avgBufferingDurationMs_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Storage & Databases/d1Database.dash.json b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/d1Database.dash.json new file mode 100644 index 00000000..e3b6edf6 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/d1Database.dash.json @@ -0,0 +1,722 @@ +{ + "name": "D1 Database", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "b3b6d4ef-3abd-4b13-a668-39508456677c", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Read Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.readQueries" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.readQueries_sum", + "comparisonColumn": "none", + "label": "Read Queries" + } + } + } + } + }, + { + "i": "ce927319-f043-46a7-8947-9712d3552c9e", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Write Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.writeQueries" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.writeQueries_sum", + "comparisonColumn": "none", + "label": "Write Queries" + } + } + } + } + }, + { + "i": "d1d8844f-9379-45b1-a0d1-01bc5522f057", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Rows Read", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.rowsRead" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.rowsRead_sum", + "comparisonColumn": "none", + "label": "Rows Read" + } + } + } + } + }, + { + "i": "caff80bd-89af-4323-8abd-cae897ff04a5", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Database Size", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Storage]}}", + "name": "d1Storage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.databaseSizeBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.databaseSizeBytes_max", + "comparisonColumn": "none", + "label": "Database Size" + } + } + } + } + }, + { + "i": "8a08f463-7e74-400b-bbf5-edb3356d59c6", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Database Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "a18c16cd-7ac9-4503-b5f9-b22b8d6c2db4", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.readQueries" + ] + }, + { + "type": "sum", + "names": [ + "sum.writeQueries" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.readQueries_sum", + "sum.writeQueries_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "e6e55269-6262-4856-a3b9-412b31fc5fd3", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Rows Read and Written", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.rowsRead" + ] + }, + { + "type": "sum", + "names": [ + "sum.rowsWritten" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.rowsRead_sum", + "sum.rowsWritten_sum" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "fb2c70e1-5fc0-4056-ab86-0a644f3a93d4", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Query Duration Percentiles", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Analytics]}}", + "name": "d1Analytics", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "quantiles.queryBatchTimeMsP50" + ] + }, + { + "type": "max", + "names": [ + "quantiles.queryBatchTimeMsP90" + ] + }, + { + "type": "max", + "names": [ + "quantiles.queryBatchTimeMsP99" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "quantiles.queryBatchTimeMsP50_max", + "quantiles.queryBatchTimeMsP90_max", + "quantiles.queryBatchTimeMsP99_max" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "006437fe-9157-4629-8bf8-c1506f07dfb7", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Database Size", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Storage]}}", + "name": "d1Storage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.databaseSizeBytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "max.databaseSizeBytes_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "4a01e5eb-42a3-4a7d-afab-d2551abd0376", + "x": 0, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries by Database Role", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Queries]}}", + "name": "d1Queries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.databaseRole", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.databaseRole_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "4f0a6709-af34-4c20-aede-c481af6c41d2", + "x": 2, + "y": 11, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Rows Returned", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[d1Queries]}}", + "name": "d1Queries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.rowsReturned" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare D1 Database]}}" + }, + "variables": [ + "{{variables.[Cloudflare D1 Database]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byDay", + "yAxisColumn": [ + "sum.rowsReturned_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Storage & Databases/hyperdriveConfig.dash.json b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/hyperdriveConfig.dash.json new file mode 100644 index 00000000..d2c1ee83 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/hyperdriveConfig.dash.json @@ -0,0 +1,413 @@ +{ + "name": "Hyperdrive Config", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "41abb800-fee6-4faa-9896-fffc02cfdac6", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Queries" + } + } + } + } + }, + { + "i": "a9690778-5c87-4946-ac7b-ffcca1707b17", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Avg Query Latency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.queryLatency" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avg.queryLatency_mean", + "comparisonColumn": "none", + "label": "Avg Query Latency" + } + } + } + } + }, + { + "i": "46f83434-ce36-406f-a6f6-11d043f9dfff", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Daily Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_max", + "comparisonColumn": "none", + "label": "Peak Daily Queries" + } + } + } + } + }, + { + "i": "79f122cb-d720-4caf-bc5e-ab297c42b7e8", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Query Latency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "avg.queryLatency" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "avg.queryLatency_max", + "comparisonColumn": "none", + "label": "Peak Query Latency" + } + } + } + } + }, + { + "i": "2ffb0aae-abd1-4d7d-b42b-048e3000c6d0", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Config Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "6425b417-e265-4e0a-952e-2f44476bf920", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "d8a14720-8c85-4e12-bb86-8a7bd9952aaa", + "x": 0, + "y": 5, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Query Latency", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdriveQueries]}}", + "name": "hyperdriveQueries", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "avg.queryLatency" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Hyperdrive Config]}}" + }, + "variables": [ + "{{variables.[Cloudflare Hyperdrive Config]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "avg.queryLatency_mean" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Storage & Databases/kvNamespace.dash.json b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/kvNamespace.dash.json new file mode 100644 index 00000000..6df7961b --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/kvNamespace.dash.json @@ -0,0 +1,566 @@ +{ + "name": "KV Namespace", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "64a2bb14-0f54-429e-b74a-49f677e78258", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvOperations]}}", + "name": "kvOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "c416ec31-0ba0-495a-a408-4426dee9a026", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Keys", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvStorage]}}", + "name": "kvStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.keyCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.keyCount_max", + "comparisonColumn": "none", + "label": "Keys" + } + } + } + } + }, + { + "i": "3999ca4b-3aa6-441b-83a4-8a2882d9eaa2", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stored Bytes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvStorage]}}", + "name": "kvStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.byteCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.byteCount_max", + "comparisonColumn": "none", + "label": "Stored Bytes" + } + } + } + } + }, + { + "i": "a03c3ae0-9707-4c25-8543-c96f23ead83c", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Latency P99", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvOperations]}}", + "name": "kvOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "quantiles.latencyMsP99" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "quantiles.latencyMsP99_max", + "comparisonColumn": "none", + "label": "Peak Latency P99" + } + } + } + } + }, + { + "i": "8ac4f1cd-177a-4ce0-b9fc-4bb2f9ae33f8", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Namespace Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "8819f11c-eda9-4536-a767-274c8fac5c4f", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvOperations]}}", + "name": "kvOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "sum.requests_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "6ee4337c-c1d0-4a60-84bd-632a00b2eb30", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Operation", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvOperations]}}", + "name": "kvOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.actionType", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sum.requests_sum", + "labelColumn": "dimensions.actionType_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "306acd99-f66d-4a0f-b808-e6c616b0f160", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Latency Percentiles", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvOperations]}}", + "name": "kvOperations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "quantiles.latencyMsP50" + ] + }, + { + "type": "max", + "names": [ + "quantiles.latencyMsP90" + ] + }, + { + "type": "max", + "names": [ + "quantiles.latencyMsP99" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "quantiles.latencyMsP50_max", + "quantiles.latencyMsP90_max", + "quantiles.latencyMsP99_max" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "3858229c-8507-48ae-bb01-78eec18757f1", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Key Count", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[kvStorage]}}", + "name": "kvStorage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.keyCount" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare KV Namespace]}}" + }, + "variables": [ + "{{variables.[Cloudflare KV Namespace]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "max.keyCount_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Storage & Databases/manifest.json b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/manifest.json new file mode 100644 index 00000000..009c56aa --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/manifest.json @@ -0,0 +1,20 @@ +{ + "items": [ + { + "name": "r2Bucket", + "type": "dashboard" + }, + { + "name": "d1Database", + "type": "dashboard" + }, + { + "name": "kvNamespace", + "type": "dashboard" + }, + { + "name": "hyperdriveConfig", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Storage & Databases/r2Bucket.dash.json b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/r2Bucket.dash.json new file mode 100644 index 00000000..d841eb4e --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/r2Bucket.dash.json @@ -0,0 +1,564 @@ +{ + "name": "R2 Bucket", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "0386adc1-d8ee-4ff1-af52-bf5db3b3aba7", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Operations]}}", + "name": "r2Operations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.requests_sum", + "comparisonColumn": "none", + "label": "Requests" + } + } + } + } + }, + { + "i": "31cbee1e-67d6-4f02-b9b0-53429d52e24f", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Data Transferred", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Operations]}}", + "name": "r2Operations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.responseBytes" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "sum.responseBytes_sum", + "comparisonColumn": "none", + "label": "Data Transferred" + } + } + } + } + }, + { + "i": "eb6479e5-2310-4e23-87fb-0e06242866aa", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Objects", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Storage]}}", + "name": "r2Storage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.objectCount" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.objectCount_max", + "comparisonColumn": "none", + "label": "Objects" + } + } + } + } + }, + { + "i": "6fa534a8-06df-4790-a0d5-694db1416e00", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stored Bytes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Storage]}}", + "name": "r2Storage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "max.payloadSize" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "max.payloadSize_max", + "comparisonColumn": "none", + "label": "Stored Bytes" + } + } + } + } + }, + { + "i": "f38bfdfd-8422-45d6-bbe1-a810bae04dcc", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bucket Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "3a538ff6-f36c-4e48-8efa-ea8663576376", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Operations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Operations]}}", + "name": "r2Operations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "sum.requests_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "a0c48140-ad87-4aa2-9023-1119f1f7391c", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Operations by Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Operations]}}", + "name": "r2Operations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.actionType", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.actionType_uniqueValues", + "yAxisData": [ + "sum.requests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "e3a08ccf-45a3-48e3-98a6-2a50b444ab6d", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Operations by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Operations]}}", + "name": "r2Operations", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.actionStatus", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.requests_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "sum.requests_sum", + "labelColumn": "dimensions.actionStatus_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "ac43e3d1-d7e6-4341-aa16-0c741fa39b9d", + "x": 0, + "y": 8, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stored Bytes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Storage]}}", + "name": "r2Storage", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "max", + "names": [ + "max.payloadSize" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.datetime_byHour", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare R2 Bucket]}}" + }, + "variables": [ + "{{variables.[Cloudflare R2 Bucket]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.datetime_byHour", + "yAxisColumn": [ + "max.payloadSize_max" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Traffic/loadBalancerPool.dash.json b/plugins/Cloudflare/v2/defaultContent/Traffic/loadBalancerPool.dash.json new file mode 100644 index 00000000..fee2e185 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Traffic/loadBalancerPool.dash.json @@ -0,0 +1,379 @@ +{ + "name": "Load Balancer Pool", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "fb17591a-54bb-4977-a18f-b38393ed1d7d", + "x": 0, + "y": 0, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pool Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "7607c0c4-39ca-4249-b378-97656e6bb18c", + "x": 2, + "y": 0, + "w": 1, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Origin Checks", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPoolHealth]}}", + "name": "loadBalancerPoolHealth", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Origin Checks" + } + } + } + } + }, + { + "i": "8d2a035e-d20f-44c2-b7f8-b0527bcd6dc3", + "x": 3, + "y": 0, + "w": 1, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Unhealthy Checks", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPoolHealth]}}", + "name": "loadBalancerPoolHealth", + "pluginConfigId": "{{configId}}", + "filter": { + "multiOperation": "and", + "filters": [ + { + "column": "healthy", + "operation": "equals", + "value": "false" + } + ] + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Unhealthy Checks" + } + } + } + } + }, + { + "i": "e1e6ceb8-d7a1-4a9e-a9a3-460fde989299", + "x": 0, + "y": 3, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Health Check Results", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPoolHealth]}}", + "name": "loadBalancerPoolHealth", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "healthy", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count", + "labelColumn": "healthy_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "6b84a7bd-0dbc-4a62-99e6-58f8851bd5e3", + "x": 2, + "y": 3, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Checks by Data Centre", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPoolHealth]}}", + "name": "loadBalancerPoolHealth", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "colo", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ], + "top": 15 + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "colo_uniqueValues", + "yAxisData": [ + "count" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "88076a78-f154-4ac7-8a32-fd581d9fb2b5", + "x": 0, + "y": 6, + "w": 4, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Origin Health", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[loadBalancerPoolHealth]}}", + "name": "loadBalancerPoolHealth", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "healthy", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Load Balancer Pool]}}" + }, + "variables": [ + "{{variables.[Cloudflare Load Balancer Pool]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "colo", + "origin", + "healthy", + "responseCode", + "rtt", + "failureReason" + ], + "hiddenColumns": [ + "coloHealthy" + ] + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Traffic/manifest.json b/plugins/Cloudflare/v2/defaultContent/Traffic/manifest.json new file mode 100644 index 00000000..de31d756 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Traffic/manifest.json @@ -0,0 +1,8 @@ +{ + "items": [ + { + "name": "loadBalancerPool", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zero Trust/accessApplication.dash.json b/plugins/Cloudflare/v2/defaultContent/Zero Trust/accessApplication.dash.json new file mode 100644 index 00000000..610e6381 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zero Trust/accessApplication.dash.json @@ -0,0 +1,658 @@ +{ + "name": "Access Application", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "4401425e-7e78-4997-a7f9-3bf38003f37c", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Logins", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Logins" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "c0679dba-38bc-4dca-b22e-d973950a66c4", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Successful Logins", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "filter": { + "multiOperation": "and", + "filters": [ + { + "column": "dimensions.isSuccessfulLogin", + "operation": "equals", + "value": "true" + } + ] + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Successful Logins" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "b7bce084-b259-4bc6-b4e9-73315ee4573f", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Failed Logins", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "filter": { + "multiOperation": "and", + "filters": [ + { + "column": "dimensions.isSuccessfulLogin", + "operation": "equals", + "value": "false" + } + ] + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count_sum", + "comparisonColumn": "none", + "label": "Failed Logins" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "80cbde5c-b03f-4edf-be3b-27947acb1d86", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Countries", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "dimensions.country" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "dimensions.country_distinctCount", + "comparisonColumn": "none", + "label": "Countries" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "14f87e15-cae4-4603-b354-8f283b6f8831", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Application Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "20ae9685-fe87-4ab4-8eab-f6aa4903a82a", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Logins", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "dimensions.date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "dimensions.date_byDay", + "yAxisColumn": [ + "count_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "0cb3ca1c-0d8c-4ec8-8cc9-edcdf337b9fb", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Identity Providers", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.identityProvider", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.identityProvider_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "cb348c6a-6aab-44b5-864b-3808756ff226", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Logins by Country", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.country", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "dimensions.country_uniqueValues", + "yAxisData": [ + "count_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "9f3127b2-4f9c-4fba-bb48-15796f1f093a", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Login Outcomes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.isSuccessfulLogin", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.isSuccessfulLogin_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "a14fc79d-1fa7-45dd-929f-fb0b5b4790b1", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "WARP Enabled", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accessLogins]}}", + "name": "accessLogins", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.hasWarpEnabled", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "count" + ] + } + ] + }, + "sort": { + "by": [ + [ + "count_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Access Application]}}" + }, + "variables": [ + "{{variables.[Cloudflare Access Application]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count_sum", + "labelColumn": "dimensions.hasWarpEnabled_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + }, + "timeframe": "last7days" + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zero Trust/manifest.json b/plugins/Cloudflare/v2/defaultContent/Zero Trust/manifest.json new file mode 100644 index 00000000..dc52a9b2 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zero Trust/manifest.json @@ -0,0 +1,16 @@ +{ + "items": [ + { + "name": "tunnel", + "type": "dashboard" + }, + { + "name": "accessApplication", + "type": "dashboard" + }, + { + "name": "turnstileWidget", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zero Trust/tunnel.dash.json b/plugins/Cloudflare/v2/defaultContent/Zero Trust/tunnel.dash.json new file mode 100644 index 00000000..c0ce8dfa --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zero Trust/tunnel.dash.json @@ -0,0 +1,306 @@ +{ + "name": "Tunnel", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "e0ced236-ba52-475b-808a-4ee02f0678e3", + "x": 0, + "y": 0, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Tunnel Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Tunnel]}}" + }, + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "49a68abf-e454-4c27-83e2-c5eee8ee4251", + "x": 2, + "y": 0, + "w": 1, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Connections", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnelConnections]}}", + "name": "tunnelConnections", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "count" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Tunnel]}}" + }, + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "count", + "comparisonColumn": "none", + "label": "Connections" + } + } + } + } + }, + { + "i": "6119da2c-122c-47ad-ba03-919723c9b3e8", + "x": 3, + "y": 0, + "w": 1, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Data Centres", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnelConnections]}}", + "name": "tunnelConnections", + "pluginConfigId": "{{configId}}", + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "colo_name" + ] + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Tunnel]}}" + }, + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "colo_name_distinctCount", + "comparisonColumn": "none", + "label": "Data Centres" + } + } + } + } + }, + { + "i": "181cf765-7d39-4ce6-a272-cc80cdf5cbcd", + "x": 0, + "y": 3, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Connections by Data Centre", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnelConnections]}}", + "name": "tunnelConnections", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "colo_name", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ], + "top": 15 + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Tunnel]}}" + }, + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "colo_name_uniqueValues", + "yAxisData": [ + "count" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "d39022b4-50e5-4c24-8bd6-435bea7475bb", + "x": 0, + "y": 6, + "w": 4, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Connections", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[tunnelConnections]}}", + "name": "tunnelConnections", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "opened_at", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Tunnel]}}" + }, + "variables": [ + "{{variables.[Cloudflare Tunnel]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "colo_name", + "origin_ip", + "client_version", + "arch", + "opened_at", + "is_pending_reconnect" + ], + "hiddenColumns": [ + "connectionId" + ] + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zero Trust/turnstileWidget.dash.json b/plugins/Cloudflare/v2/defaultContent/Zero Trust/turnstileWidget.dash.json new file mode 100644 index 00000000..2f4dcf6a --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zero Trust/turnstileWidget.dash.json @@ -0,0 +1,514 @@ +{ + "name": "Turnstile Widget", + "schemaVersion": "1.5", + "timeframe": "last7days", + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "bd31abaf-2d0c-43fd-a3b8-1d3bfbaf5fe8", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Challenges", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "eventType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "sum", + "names": [ + "challenges" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "challenges_sum", + "comparisonColumn": "none", + "label": "Challenges" + } + } + } + } + }, + { + "i": "932b5e77-d950-4100-9fc1-750549ebd313", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Challenges", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "eventType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "max", + "names": [ + "challenges" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "challenges_max", + "comparisonColumn": "none", + "label": "Peak Challenges" + } + } + } + } + }, + { + "i": "cd91cfab-0e72-4b8b-a06e-6cec4aac31d4", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Event Types", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "eventType" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "breakdown" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "breakdown_distinctCount", + "comparisonColumn": "none", + "label": "Event Types" + } + } + } + } + }, + { + "i": "14d6304c-e8f9-4ff1-a02a-2b6443d6eca9", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Actions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [], + "aggregate": [ + { + "type": "distinctCount", + "names": [ + "breakdown" + ] + } + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": "breakdown_distinctCount", + "comparisonColumn": "none", + "label": "Actions" + } + } + } + } + }, + { + "i": "53563637-a7eb-4df5-a9fd-419f8ad7f261", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Widget Details", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": true, + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type" + ] + } + } + } + } + }, + { + "i": "f5316d80-3f1e-45fb-bbb5-260b2dcb9b25", + "x": 2, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Challenges Over Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "eventType" + }, + "group": { + "by": [ + [ + "date", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "challenges" + ] + } + ] + }, + "sort": { + "by": [ + [ + "date_byDay", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "date_byDay", + "yAxisColumn": [ + "challenges_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "be0a2090-0dfd-4adb-b896-358712f1b091", + "x": 0, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Challenges by Event Type", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "eventType" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "challenges" + ] + } + ] + }, + "sort": { + "by": [ + [ + "challenges_sum", + "desc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "challenges_sum", + "labelColumn": "breakdown_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "3c814883-df37-4482-be86-1d36caa933ad", + "x": 2, + "y": 5, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Challenge Actions", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[turnstileChallenges]}}", + "name": "turnstileChallenges", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "action" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "challenges" + ] + } + ] + }, + "sort": { + "by": [ + [ + "challenges_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Turnstile Widget]}}" + }, + "variables": [ + "{{variables.[Cloudflare Turnstile Widget]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "challenges_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "vertical", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/manifest.json b/plugins/Cloudflare/v2/defaultContent/manifest.json new file mode 100644 index 00000000..16109b00 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/manifest.json @@ -0,0 +1,36 @@ +{ + "items": [ + { + "name": "overview", + "type": "dashboard" + }, + { + "name": "Core", + "type": "folder" + }, + { + "name": "Compute", + "type": "folder" + }, + { + "name": "Storage & Databases", + "type": "folder" + }, + { + "name": "AI", + "type": "folder" + }, + { + "name": "Zero Trust", + "type": "folder" + }, + { + "name": "Traffic", + "type": "folder" + }, + { + "name": "Media", + "type": "folder" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/overview.dash.json b/plugins/Cloudflare/v2/defaultContent/overview.dash.json new file mode 100644 index 00000000..ffc80611 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/overview.dash.json @@ -0,0 +1,1994 @@ +{ + "name": "Overview", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "ccf7079b-045c-4bd3-b7b1-52d6bc2e77a0", + "x": 0, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Accounts", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Accounts" + } + } + } + } + }, + { + "i": "4bcccd3d-38e3-4f95-97e2-6447e9d902f4", + "x": 1, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zones", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Zones" + } + } + } + } + }, + { + "i": "9861c8c5-2f72-4d6e-a15e-a77870b994c1", + "x": 2, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Workers" + } + } + } + } + }, + { + "i": "d22c9705-97e7-4a7c-b159-fa8c155fdd98", + "x": 3, + "y": 0, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Projects", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Pages Projects" + } + } + } + } + }, + { + "i": "8868fd1a-1a18-4e3a-abca-eef5fa86f038", + "x": 0, + "y": 2, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "R2 Buckets", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "R2 Buckets" + } + } + } + } + }, + { + "i": "75f080ca-6ba8-4c2c-ade9-91a7d1600472", + "x": 1, + "y": 2, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "KV Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "KV Namespaces" + } + } + } + } + }, + { + "i": "9e250b2d-8c02-4770-aad5-99536906389b", + "x": 2, + "y": 2, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "D1 Databases", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "D1 Databases" + } + } + } + } + }, + { + "i": "3dd81119-7ee0-4d0f-a712-53445e92bdf7", + "x": 3, + "y": 2, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queues", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Queues" + } + } + } + } + }, + { + "i": "9de616f8-033c-42af-9d1e-e2a78123bd73", + "x": 0, + "y": 4, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Tunnels", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Tunnels" + } + } + } + } + }, + { + "i": "38f82716-36d7-4c6e-94a7-23802d910c96", + "x": 1, + "y": 4, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Load Balancer Pools", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Load Balancer Pools" + } + } + } + } + }, + { + "i": "0deace6d-08ad-4289-8631-f1e13fa67c57", + "x": 2, + "y": 4, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Access Applications", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Access Applications" + } + } + } + } + }, + { + "i": "fdac72fb-6dbc-4fe0-af7f-609f5a8bb33e", + "x": 3, + "y": 4, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zones Paused", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "filter": { + "multiOperation": "and", + "filters": [ + { + "column": "paused", + "operation": "equals", + "value": "true" + } + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Zones Paused" + } + } + } + } + }, + { + "i": "524486a8-32fa-4f78-b4a9-6b7ed041e4a0", + "x": 0, + "y": 6, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Durable Object Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Durable Object Namespaces" + } + } + } + } + }, + { + "i": "35d98b3f-2655-4aba-a3cd-88a226b17f42", + "x": 1, + "y": 6, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Vectorize Indexes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Vectorize Indexes" + } + } + } + } + }, + { + "i": "0c653b77-3432-441f-b96c-8c719c5373c4", + "x": 2, + "y": 6, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Hyperdrive Configs", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Hyperdrive Configs" + } + } + } + } + }, + { + "i": "826954c4-1d61-4f57-ac7c-534bd68bc919", + "x": 3, + "y": 6, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Routes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Worker Routes]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Worker Routes" + } + } + } + } + }, + { + "i": "35149d84-7770-41ca-984d-dfb3d25af0f7", + "x": 0, + "y": 8, + "w": 1, + "h": 2, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Bindings", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties" + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Worker Bindings]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-scalar", + "config": { + "data-stream-scalar": { + "value": { + "type": "count" + }, + "comparisonColumn": "none", + "label": "Worker Bindings" + } + } + } + } + }, + { + "i": "01071810-2460-4d6f-ac37-2d8c6c78ace3", + "x": 0, + "y": 10, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zones by Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "group": { + "by": [ + [ + "status", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count", + "labelColumn": "status_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "06de4718-8250-4cc0-b864-1d9cc11c1394", + "x": 2, + "y": 10, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zones by Plan", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "group": { + "by": [ + [ + "planName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "count" + } + ] + }, + "sort": { + "by": [ + [ + "count", + "desc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "count", + "labelColumn": "planName_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "6b70dcfc-f6fe-4f22-a57c-7fa7fa23be9c", + "x": 0, + "y": 13, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zones", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "status", + "sublabel": "planName", + "linkColumn": "link", + "columns": 4, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "2bbc6141-d374-41c7-93b1-3b3f7677c193", + "x": 0, + "y": 16, + "w": 4, + "h": 4, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zone Inventory", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "name", + "status", + "planName", + "accountName", + "zoneType", + "developmentModeActive", + "activatedOn" + ], + "hiddenColumns": [ + "id", + "label", + "link", + "links", + "sourceId", + "sourceName", + "type", + "sourceType", + "accountId", + "paused", + "createdOn", + "nameServers" + ], + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "5be40674-431e-465f-94fc-3b658438dc77", + "x": 0, + "y": 20, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Workers", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "usageModel", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "f51e9fdc-9a9e-4272-b24d-9d5d11eac793", + "x": 2, + "y": 20, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pages Projects", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pages Projects]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "latestDeploymentStatus", + "sublabel": "productionBranch", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "f2587bfd-deef-45ac-9501-1d66bf9c7734", + "x": 0, + "y": 23, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Tunnels", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Tunnels]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "status", + "sublabel": "tunnelType", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "af6eee0c-cfbf-43e1-a51c-53dca0e9a356", + "x": 2, + "y": 23, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Load Balancer Pools", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Load Balancer Pools]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "9beee6df-b954-4c3f-9c99-dd09a66a3f6a", + "x": 0, + "y": 26, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "R2 Buckets", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare R2 Buckets]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "location", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "c6e175b9-164a-4b14-a4a2-22312083c04f", + "x": 2, + "y": 26, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "D1 Databases", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare D1 Databases]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "62ced3d6-e538-4573-af2c-24365a1d7b52", + "x": 0, + "y": 29, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "KV Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare KV Namespaces]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "4a7ce999-9bb4-48f9-890d-6d6dcb4d5e49", + "x": 2, + "y": 29, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Queues", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Queues]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "0db6f61a-dc9f-499c-bd92-b863f2cc9eed", + "x": 0, + "y": 32, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Access Applications", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Access Applications]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "domain", + "linkColumn": "link", + "columns": 4, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "2e3d6f85-4a2c-4429-b1cc-f1b1a7750964", + "x": 0, + "y": 35, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Durable Object Namespaces", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Durable Object Namespaces]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "scriptName", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "f8197c33-da9e-4c1f-91eb-03271dec641f", + "x": 2, + "y": 35, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Vectorize Indexes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Vectorize Indexes]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "metric", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "6f46fa83-d107-4c9e-a103-bb10026a3f91", + "x": 0, + "y": 38, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Hyperdrive Configs", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Hyperdrive Configs]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "database", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "7c07b110-f283-4502-a0fc-9d8790815b9c", + "x": 2, + "y": 38, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Routes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Worker Routes]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "scriptName", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "2115654f-a854-4c27-8231-e3d8dc3cd77c", + "x": 0, + "y": 41, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Bindings", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Worker Bindings]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "bindingType", + "linkColumn": "link", + "columns": 4, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "24cf5eb9-6bad-433f-a748-637d668a707b", + "x": 0, + "y": 44, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Stream Videos", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Stream Videos]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "statusState", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "c4afc6e8-d873-439e-b23a-524115490249", + "x": 2, + "y": 44, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Turnstile Widgets", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Turnstile Widgets]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "mode", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "f1c1ad4a-931b-4987-a772-d8367090ef02", + "x": 0, + "y": 47, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AI Gateways", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare AI Gateways]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "ca16cfd0-c194-409b-94a6-4d4297c9254a", + "x": 2, + "y": 47, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "AutoRAGs", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare AutoRAGs]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "status", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "2dc4925f-e310-48f8-aa1a-8cc5b80e52d4", + "x": 0, + "y": 50, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Container Applications", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Container Applications]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "imageName", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "1ed1f8bb-409a-492e-a0fd-ca4a7682c558", + "x": 2, + "y": 50, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Pipelines", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Pipelines]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "sublabel": "endpoint", + "linkColumn": "link", + "columns": 2, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + }, + { + "i": "64731322-4823-4187-8d15-cfa52d8f0c58", + "x": 0, + "y": 53, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Realtime Apps", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "datastream-properties", + "name": "properties", + "sort": { + "by": [ + [ + "name", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Realtime Apps]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "none", + "linkColumn": "link", + "columns": 4, + "rowLinkColumnName": { + "value": "link", + "label": "Link" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/scopes.json b/plugins/Cloudflare/v2/defaultContent/scopes.json new file mode 100644 index 00000000..8dbbd7c3 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/scopes.json @@ -0,0 +1,393 @@ +[ + { + "name": "Cloudflare Accounts", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Account" + ] + } + }, + "variable": { + "name": "Cloudflare Account", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Zones", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "variable": { + "name": "Cloudflare Zone", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Workers", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker" + ] + } + }, + "variable": { + "name": "Cloudflare Worker", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare R2 Buckets", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare R2 Bucket" + ] + } + }, + "variable": { + "name": "Cloudflare R2 Bucket", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Pages Projects", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Pages Project" + ] + } + }, + "variable": { + "name": "Cloudflare Pages Project", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare D1 Databases", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare D1 Database" + ] + } + }, + "variable": { + "name": "Cloudflare D1 Database", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare KV Namespaces", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare KV Namespace" + ] + } + }, + "variable": { + "name": "Cloudflare KV Namespace", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Queues", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Queue" + ] + } + }, + "variable": { + "name": "Cloudflare Queue", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Tunnels", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Tunnel" + ] + } + }, + "variable": { + "name": "Cloudflare Tunnel", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Load Balancer Pools", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Load Balancer Pool" + ] + } + }, + "variable": { + "name": "Cloudflare Load Balancer Pool", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Access Applications", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Access Application" + ] + } + }, + "variable": { + "name": "Cloudflare Access Application", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Durable Object Namespaces", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Durable Object Namespace" + ] + } + }, + "variable": { + "name": "Cloudflare Durable Object Namespace", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Vectorize Indexes", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Vectorize Index" + ] + } + }, + "variable": { + "name": "Cloudflare Vectorize Index", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Hyperdrive Configs", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Hyperdrive Config" + ] + } + }, + "variable": { + "name": "Cloudflare Hyperdrive Config", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Worker Routes", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker Route" + ] + } + }, + "variable": { + "name": "Cloudflare Worker Route", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Worker Bindings", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker Binding" + ] + } + }, + "variable": { + "name": "Cloudflare Worker Binding", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Stream Videos", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Stream Video" + ] + } + }, + "variable": { + "name": "Cloudflare Stream Video", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Turnstile Widgets", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Turnstile Widget" + ] + } + }, + "variable": { + "name": "Cloudflare Turnstile Widget", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare AI Gateways", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare AI Gateway" + ] + } + }, + "variable": { + "name": "Cloudflare AI Gateway", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare AutoRAGs", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare AutoRAG" + ] + } + }, + "variable": { + "name": "Cloudflare AutoRAG", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Container Applications", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Container Application" + ] + } + }, + "variable": { + "name": "Cloudflare Container Application", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Pipelines", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Pipeline" + ] + } + }, + "variable": { + "name": "Cloudflare Pipeline", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + }, + { + "name": "Cloudflare Realtime Apps", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Realtime App" + ] + } + }, + "variable": { + "name": "Cloudflare Realtime App", + "allowMultipleSelection": false, + "default": "none", + "type": "object" + } + } +] diff --git a/plugins/Cloudflare/v2/docs/README.md b/plugins/Cloudflare/v2/docs/README.md new file mode 100644 index 00000000..a1f73107 --- /dev/null +++ b/plugins/Cloudflare/v2/docs/README.md @@ -0,0 +1,231 @@ +Monitor your [Cloudflare](https://www.cloudflare.com) account in SquaredUp - zone traffic and cache performance, firewall and WAF activity, DNS records and SSL certificate expiry, plus the developer platform: Workers, R2, KV, D1, Queues, Pages, Tunnels, Load Balancers and Access applications. Data comes from the [Cloudflare REST API](https://developers.cloudflare.com/api/) and the [GraphQL Analytics API](https://developers.cloudflare.com/analytics/graphql-api/). + +> ⚠️ This plugin is **read-only** and never changes anything in your Cloudflare account. It does not cover Logpush, Magic Transit, Magic WAN, Spectrum or Waiting Room. + +## Setup + +You will need a Cloudflare **API token**. Legacy Global API Keys are not supported. + +1. Sign in to the [Cloudflare dashboard](https://dash.cloudflare.com). +2. Go to [**My Profile → API Tokens**](https://dash.cloudflare.com/profile/api-tokens) and click **Create Token**. +3. Scroll to the bottom and choose **Create Custom Token → Get started**. +4. Give the token a name, such as `SquaredUp`. +5. Under **Permissions**, add each row below. Every one is **Read** - the plugin never writes. Omit a row only if you do not use that product; the matching import step is optional and will report a warning rather than failing the import. + + | Scope | Permission | Access | + | ----------- | -------------------------------- | -------- | + | **Account** | Account Settings | **Read** | + | **Account** | Account Analytics | **Read** | + | **Account** | Workers Scripts | **Read** | + | **Account** | Workers R2 Storage | **Read** | + | **Account** | Workers KV Storage | **Read** | + | **Account** | D1 | **Read** | + | **Account** | Queues | **Read** | + | **Account** | Cloudflare Pages | **Read** | + | **Account** | Cloudflare Tunnel | **Read** | + | **Account** | Load Balancing: Monitors and Pools | **Read** | + | **Account** | Access: Apps and Policies | **Read** | + | **Zone** | Zone | **Read** | + | **Zone** | Zone Analytics | **Read** | + | **Zone** | DNS | **Read** | + | **Zone** | SSL and Certificates | **Read** | + | **Zone** | Health Checks | **Read** | + + The Durable Objects, Vectorize, Hyperdrive, Stream, Turnstile, AI Gateway, AutoRAG, Containers, Pipelines and Realtime endpoints were all reachable in testing with the permissions above and needed nothing extra. If your account restricts those products and their imports come back empty, add their **Read** permissions too. The Zero Trust Gateway streams read through **Account Analytics**, so they need no separate Gateway permission. + +6. Under **Account Resources**, choose **Include → All accounts** (or select the specific accounts you want SquaredUp to see). +7. Under **Zone Resources**, choose **Include → All zones from an account** or **All zones**. +8. Leave **Client IP Address Filtering** empty unless your SquaredUp agent has a fixed egress IP, and set **TTL** to a long expiry or leave it unset - an expired token stops all data collection. +9. Click **Continue to summary**, then **Create Token**, and copy the token shown. Cloudflare displays it **once only**. +10. Paste it into the **API token** field in SquaredUp. + +For more detail see Cloudflare's own guide to [creating API tokens](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). + +## Configuration fields + +| Field | What it is | Where to find it | Required | +| ------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------- | +| **API token** | A Cloudflare API token, sent as `Authorization: Bearer ` on every request to the API. | Cloudflare dashboard → [**My Profile → API Tokens**](https://dash.cloudflare.com/profile/api-tokens) → **Create Custom Token**. | Yes | + +On save, the plugin verifies the token against Cloudflare's token-verification endpoint. A failure means the token is invalid, expired or revoked - it does **not** check individual permissions, so a token that saves successfully can still return no data for a product whose permission you left out. + +## What this plugin monitors + +- **Zone traffic and caching** - requests, bandwidth, cached requests and bytes, page views, unique visitors and cache hit ratio per hour, plus breakdowns by country, status code, cache status, host, device type, HTTP protocol and content type. +- **Security** - firewall and WAF events by rule, service, country, host, user agent or path, with the action Cloudflare took; and SSL certificate inventory with days until expiry. +- **DNS and availability** - every DNS record in a zone with its type, content, TTL and proxy status; standalone health checks; and load balancer request distribution and per-origin pool health. +- **Web performance** - Core Web Vitals (Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift) and page-load volume from Cloudflare Web Analytics, per zone. +- **Developer platform** - Worker invocations, errors, subrequests and CPU-time percentiles; R2 bucket operations and stored size; KV operations, latency and stored keys; D1 query counts, rows touched and database size; Queue message operations and backlog; Durable Object invocations and storage; Vectorize and Hyperdrive query volume; Workers AI inference by model; and Pages deployment history with branch and commit. +- **Dependency mapping** - which Worker binds which KV namespace, R2 bucket, D1 database, queue, Durable Object namespace, Vectorize index or Hyperdrive config, and which zones each Worker serves. +- **Zero Trust** - Access application inventory and login attempts, Tunnel connector health, Turnstile challenges, and Gateway DNS, HTTP and network filtering activity. +- **Media** - Cloudflare Stream minutes viewed and playback quality, Images request and transformation volume, and Realtime bandwidth. +- **AI platform** - AI Gateway requests, errors, cache and cost by model or provider; AutoRAG query volume; Vectorize; Workers AI inference; and Browser Rendering sessions. +- **Email** - Email Routing message flow and DMARC alignment per zone. + +The out-of-the-box dashboards open with a **Cloudflare Overview**, with perspectives grouped by Cloudflare product family - Core, Compute, Storage & Databases, AI, Media, Zero Trust and Traffic. Worker Routes and Worker Bindings are indexed and drive the relationship graph but have no perspective of their own. + +## Data streams + +- **Zone Traffic** - hourly requests, bandwidth, cached traffic, threats, page views and cache hit ratio for a zone. +- **Zone Traffic Breakdown** - requests, bytes and visits for a zone grouped by a dimension you choose (country, status code, cache status, host, device type, HTTP protocol or content type). +- **Zone Firewall Events** - firewall and WAF event counts for a zone by action, grouped by rule, service, country, host, user agent or path. +- **Load Balancing Requests** - load balancer request counts for a zone by load balancer, pool, origin and edge location. +- **DNS Records** - every DNS record in a zone with type, content, TTL, proxy status and tags. +- **SSL Certificates** - certificate packs for a zone with issuer, validation method, expiry date and days until expiry. +- **Health Checks** - standalone health checks configured on a zone with status, address, interval and failure reason. +- **Worker Invocations** - requests, errors, subrequests and CPU-time percentiles for one Worker script. +- **R2 Operations** - requests and response bytes against an R2 bucket by operation type and outcome. +- **R2 Storage** - stored object count, payload size, metadata size and upload count for an R2 bucket over time. +- **KV Operations** - daily request counts and latency percentiles for a KV namespace by operation type. +- **KV Storage** - daily stored key count and byte size for a KV namespace. +- **D1 Queries** - daily read and write query counts, rows read and written, response bytes and query-time percentiles for a D1 database. +- **D1 Storage** - daily stored size of a D1 database. +- **Queue Message Operations** - message write, read and delete operations on a queue with outcome, consumer type, lag time and retry count. +- **Queue Backlog** - average messages and bytes waiting in a queue over time. +- **Pages Deployments** - deployment history for a Pages project with environment, status, branch, commit and URL. +- **Tunnel Connections** - active connector connections for a Tunnel with edge location, origin IP, connector version and architecture. +- **Load Balancer Pool Health** - per-origin health, response code, response time and failure reason for a pool at each Cloudflare edge location. +- **Access Logins** - daily Zero Trust login attempts for an Access application by identity provider, country and outcome. +- **DNS Analytics** - authoritative DNS query volume and response time for a zone, grouped by query name, query type, response code or edge location. +- **Email Routing** - forwarded and rejected messages for a zone by action, status and rule. +- **DMARC Reports** - DMARC alignment for a zone by sending source, with pass rate and message volume. +- **Cache Reserve Operations** - read, write and delete operations against a zone's Cache Reserve. +- **Cache Reserve Storage** - bytes and object count held in a zone's Cache Reserve over time. +- **Health Check Events** - standalone health check results for a zone with status, region, failure reason and response time. +- **Network Error Logs** - browser-reported network errors for a zone by error type and edge location. +- **Page Shield Reports** - client-side scripts and resources observed on a zone. +- **Web Analytics Page Loads** - page views and visits for a zone's hostnames, grouped by country, device type or referrer. +- **Core Web Vitals** - P75 Largest Contentful Paint, Interaction to Next Paint and Cumulative Layout Shift for a zone's hostnames. +- **Gateway DNS Queries** - Zero Trust Gateway DNS resolutions for an account by policy decision, category, location or query type. +- **Gateway HTTP Requests** - Zero Trust Gateway proxied web requests for an account by action, host or category. +- **Gateway Network Sessions** - Zero Trust Gateway TCP and UDP sessions for an account by action, destination, protocol or device. +- **Workers AI Inference** - Workers AI inference requests for an account by model, with token counts and average duration. +- **Durable Object Invocations** - requests, errors and wall-time percentiles for a Durable Object namespace. +- **Durable Object Storage** - stored bytes for a SQLite-backed Durable Object namespace over time. +- **Vectorize Queries** - query volume and average latency for a Vectorize index. +- **Vectorize Storage** - stored vector count and dimensions for a Vectorize index. +- **Hyperdrive Queries** - query volume and average latency for a Hyperdrive configuration. +- **Gateway Network Sessions** - Zero Trust Gateway TCP and UDP sessions for an account by action, destination, protocol or device. +- **DNS Firewall Analytics** - DNS Firewall cluster query volume, response codes and processing time for an account. +- **Audit Logs** - account audit activity grouped by action, actor or resource type. +- **Images Requests** - Cloudflare Images request volume for an account. +- **Images Unique Transformations** - daily count of unique image transformations served for an account. +- **Pages Functions Invocations** - requests, errors and CPU time for the Pages Functions running in an account, by function. +- **Browser Rendering** - Browser Rendering session count and duration for an account. +- **Stream Minutes Viewed** - daily minutes viewed for a Cloudflare Stream video. +- **Stream Playback Quality** - playback buffering and bitrate for a Stream video, by country, resolution or stream type. +- **Realtime Usage** - ingress and egress bandwidth for a Realtime application by track type. +- **Turnstile Challenges** - challenges served by a Turnstile widget, by event type or action. +- **AI Gateway Requests** - requests, tokens, cost and duration through an AI Gateway, by model or provider. +- **AI Gateway Errors** - errored requests through an AI Gateway, by model or provider. +- **AI Gateway Cache** - cache hits and misses for an AI Gateway. +- **AutoRAG Queries** - AI Search query volume for an AutoRAG instance. +- **Container Metrics** - CPU, memory, uptime and network throughput for a container application. +- **Pipeline Ingestion** - records and bytes ingested by a pipeline. +- **Queue Consumer Metrics** - average consumer concurrency for a queue. +- **Durable Object Subrequests** - uncached subrequest body size for a Durable Object namespace. +- **D1 Query Insights** - query counts, rows touched and query duration percentiles for a D1 database. +- **GraphQL Query** - runs any query you write against Cloudflare's GraphQL Analytics API, for the many datasets this plugin has no dedicated stream for. + +Twenty-four further streams back the import and the setup check and are hidden from the tile editor. + +### Writing your own GraphQL queries + +Cloudflare's GraphQL Analytics API exposes far more datasets than this plugin ships streams for. The **GraphQL Query** stream is an escape hatch: paste a query, tell it where the rows live, and it shapes the result like any other stream. + +- `start` and `end` (ISO 8601) and `startDate` and `endDate` (`YYYY-MM-DD`) are supplied automatically from the tile's timeframe, so a query can filter with `datetime_geq: $start` or `date_geq: $startDate` without hardcoding dates. +- Anything you put in **Variables** is merged on top, which is how you supply an `accountTag` or `zoneTag` - the plugin config holds neither. +- **Path to data** points at the array of rows, e.g. `data.viewer.zones.0.httpRequests1hGroups`. Get it wrong and the error lists the array paths the response actually contains. +- Choose the **None** timeframe when your query hardcodes its own date filter. + +## What gets indexed + +| Object type | API source | Represents | +| ----------- | ---------- | ---------- | +| **Cloudflare Account** | `GET /accounts` | An account the API token can see. | +| **Cloudflare Zone** | `GET /zones` | A domain proxied through Cloudflare. | +| **Cloudflare Worker** | `GET /accounts/{id}/workers/scripts` | A deployed Worker script. | +| **Cloudflare R2 Bucket** | `GET /accounts/{id}/r2/buckets` | An R2 object storage bucket. | +| **Cloudflare Pages Project** | `GET /accounts/{id}/pages/projects` | A Cloudflare Pages project. | +| **Cloudflare D1 Database** | `GET /accounts/{id}/d1/database` | A D1 SQL database. | +| **Cloudflare KV Namespace** | `GET /accounts/{id}/storage/kv/namespaces` | A Workers KV namespace. | +| **Cloudflare Queue** | `GET /accounts/{id}/queues` | A Cloudflare Queue. | +| **Cloudflare Tunnel** | `GET /accounts/{id}/cfd_tunnel` | A `cloudflared` tunnel. | +| **Cloudflare Load Balancer Pool** | `GET /accounts/{id}/load_balancers/pools` | An origin pool used by load balancing. | +| **Cloudflare Access Application** | `GET /accounts/{id}/access/apps` | A Zero Trust Access application. | +| **Cloudflare Durable Object Namespace** | `GET /accounts/{id}/workers/durable_objects/namespaces` | A Durable Object namespace and the Worker class backing it. | +| **Cloudflare Vectorize Index** | `GET /accounts/{id}/vectorize/v2/indexes` | A Vectorize vector database index. | +| **Cloudflare Hyperdrive Config** | `GET /accounts/{id}/hyperdrive/configs` | A Hyperdrive database connection configuration. | +| **Cloudflare Worker Route** | `GET /zones/{id}/workers/routes` | A URL pattern routing a zone's requests to a Worker. | +| **Cloudflare Worker Binding** | `GET /accounts/{id}/workers/scripts/{name}/settings` | A resource bound to a Worker, such as a KV namespace or R2 bucket. | +| **Cloudflare Stream Video** | `GET /accounts/{id}/stream` | A video hosted on Cloudflare Stream. | +| **Cloudflare Turnstile Widget** | `GET /accounts/{id}/challenges/widgets` | A Turnstile challenge widget. | +| **Cloudflare AI Gateway** | `GET /accounts/{id}/ai-gateway/gateways` | An AI Gateway instance proxying model calls. | +| **Cloudflare AutoRAG** | `GET /accounts/{id}/autorag/rags` | An AutoRAG / AI Search instance. | +| **Cloudflare Container Application** | `GET /accounts/{id}/containers/applications` | A deployed container application. | +| **Cloudflare Pipeline** | `GET /accounts/{id}/pipelines` | A Cloudflare Pipelines data pipeline. | +| **Cloudflare Realtime App** | `GET /accounts/{id}/calls/apps` | A Cloudflare Realtime (Calls) application. | + +**Relationships:** the plugin ships correlation rules that draw edges between imported objects: + +| Relationship | How it matches | +| ------------ | -------------- | +| Every resource **belongs to** its Account | the resource's `accountId` against the account's id | +| Worker Binding **declared by** Worker, and **targets** the KV namespace / R2 bucket / D1 database / queue / Durable Object namespace / Vectorize index / Hyperdrive config it points at | the binding's target id against that resource's id | +| Worker Binding **calls** Worker | a service binding's target script name against the Worker name, within the same account | +| Worker **serves** Zone | through the Worker Route that names both | +| Worker Route **routes to** Worker, and **belongs to** Zone | the route's script name and zone id | +| Durable Object Namespace **implemented by** Worker | the namespace's script name against the Worker name, within the same account | +| Pages Project **served by** Zone | the project's first custom domain against the zone name | +| Queue **consumed by** Worker, and **receives messages from** Worker | the queue's first consumer and first producer script name against the Worker name, within the same account | +| Turnstile Widget **protects** Zone | the widget's first allowed domain against the zone name | +| Access Application **protects** Zone | the registrable domain derived from the app's hostname against the zone name | + +Together these give a dependency graph: from a KV namespace you can see which Workers bind it, and from a Worker which zones it serves. + +Rules that match on a name rather than an id also match on `accountId`. Cloudflare only guarantees a Worker, queue, bucket or index name is unique within an account, so a token that can read two accounts would otherwise draw edges between resources in one and a same-named Worker in the other. + +Worker, R2 Bucket, Vectorize Index and Worker Binding identifiers are prefixed with the account id (`:`) because Cloudflare only guarantees those names are unique within an account. Every other type uses its own Cloudflare id. + +## Known limitations + +- **Access Applications only correlate to zones under a single-label suffix.** The rule derives the zone from the application's hostname by taking its last two labels, so `login.example.com` matches the zone `example.com`. Under a multi-label public suffix that is wrong - `login.example.co.uk` reduces to `co.uk`, which matches no zone, so the edge is not drawn. Correlation expressions have no public-suffix list to consult and Cloudflare does not return a zone id on the Access application, so applications on `.co.uk`, `.com.au` and similar domains are left unrelated rather than related to the wrong zone. + +- **One-to-many relationships only correlate on their first value.** The import serialises an array-valued property to a JSON string (`["a.com","b.com"]`) rather than storing it as a multi-valued property, and correlation conditions only offer `equals`, so an array can never match a scalar. Where a Cloudflare object names several others - a Turnstile widget's allowed domains, a Pages project's custom domains, a queue's consumers and producers - the plugin stores the full list as a readable string for display and a separate `primary*` property holding the first entry, and correlates on that. A widget covering three zones therefore draws an edge to one of them. The same constraint is why Kubernetes, the only other plugin here shipping correlation rules, joins on `primaryBackendServiceName` rather than the full backend list. + +- **Analytics timeframes are capped per dataset, and the caps are short.** Cloudflare's GraphQL Analytics API limits how wide a single query's time range can be, and the limit differs for every dataset. These were measured against a Pro-plan account: + + | Widest single query | Data streams | + | ------------------- | ------------ | + | **1 day** | Zone Firewall Events | + | **~3 days** | Zone Traffic, Load Balancing Requests, Health Check Events | + | **~1 week** | DNS Analytics, Access Logins, Turnstile Challenges | + | **8 days** | Zone Traffic Breakdown | + | **~30-32 days** | the Gateway streams, KV, D1, R2, Queues, Workers AI, Durable Objects, Vectorize, Hyperdrive, Cache Reserve, Email Routing, DMARC, Images, AI Gateway, AutoRAG, Containers, Pipelines, Realtime, Browser Rendering, Stream | + | **~93 days** | Web Analytics Page Loads, Core Web Vitals | + | **~179 days** | Audit Logs | + + Every one of these was measured against the live API by widening the range until Cloudflare rejected it - none is documented. Caps may differ on other plans, and a few sit so close to a boundary that the next-widest option had to be dropped. + + Longer ranges are not offered because Cloudflare rejects them outright. Caps may differ on Free, Business and Enterprise plans. + +- **Daily-granularity datasets have no intraday view.** KV, D1 and Access analytics are aggregated by day, so their shortest timeframe is Last 7 days. +- **R2 must be activated before it returns anything.** If R2 has never been enabled in the Cloudflare dashboard, the import step for R2 buckets fails with *"Please enable R2 through the Cloudflare Dashboard"*. The step is optional, so the rest of the import still succeeds - but no R2 objects or metrics appear. +- **Zero Trust Access must be enabled** for the Access application import to work; otherwise Cloudflare returns *"Access is not enabled"*. +- **Web Analytics must be enabled per zone.** The RUM datasets are account-scoped and filtered to a zone by hostname, so a zone without the Web Analytics beacon installed returns nothing even though the query succeeds. Traffic from hosts that are not Cloudflare zones is not reachable from a zone-scoped tile. +- **Zero Trust Gateway must be configured** for the Gateway streams to return anything. The datasets are reachable without a Gateway subscription, so an empty result means no proxied traffic rather than a permissions problem. +- **Durable Object storage covers SQLite-backed namespaces only.** Cloudflare's account-wide storage dataset cannot be filtered per namespace, so the plugin uses the SQLite storage dataset, which can. Key-value-backed namespaces report no storage. +- **Load balancing analytics is gated per zone**, not per account. Zones without the Load Balancing add-on return an authorization error rather than empty data. +- **Pages endpoints cap page size at 10.** Cloudflare rejects any larger `per_page` on the Pages API, so Pages projects and deployments are fetched ten at a time. +- **Some resource lists are not paged.** R2 buckets, D1 databases, Queues, load balancer pools, Access applications, Vectorize indexes, Hyperdrive configs, Worker scripts and Worker routes are imported in a single request each. Where Cloudflare's paging behaviour could be proven against real data it is used (zones, accounts, DNS records, Pages projects, KV namespaces, Tunnels and Durable Object namespaces all page); the rest were left unpaged because the endpoint either ignores the paging parameters outright — as `workers/scripts` does — or holds too few records in the tested account to confirm they are honoured. If an account holds more of one of these than Cloudflare returns on a single page, the remainder is not imported. +- **Rate limits.** The REST API allowed 1,200 requests per 300 seconds on the token tested, and Cloudflare documents a separate limit of 300 GraphQL queries per 5 minutes. Every analytics stream issues one request per selected object, so very large estates can hit these limits. +- **Long timeframes on per-minute analytics can return a partial series.** Cloudflare caps a GraphQL result at 10,000 rows, and the streams that break down by `datetime` produce one row per minute per dimension value - Worker Invocations, Pages Functions Invocations, Durable Object Invocations and Subrequests, D1 Queries, Queue Backlog and Consumer Metrics, R2 Operations and Storage, Cache Reserve Storage, Gateway HTTP Requests, Container Metrics, Pipeline Ingestion, Browser Rendering, Realtime Usage and Audit Logs. A busy resource can exceed 10,000 rows well inside `last30days`; because the queries order by time ascending, the excess is dropped from the end and the tile shows the earliest part of the range as though the series simply stopped. Prefer a narrower timeframe when a chart appears to end early. + +- **Hand-written GraphQL queries are unbounded.** The **GraphQL Query** stream runs whatever you give it, so it can hit limits the built-in streams are tuned to avoid: a large `limit` on a multi-dimension dataset can exceed the ~6 MB response cap, and a timeframe wider than that dataset's own cap fails outright. Prefer the pre-aggregated `*Groups` datasets over raw event datasets, and keep `limit` modest. The stream does not page, so your `limit` is the ceiling. +- **Some analytics are only available on paid plans.** Page Shield and Network Error Logs return an authorization error on plans without them; Cache Reserve, Load Balancing and Health Checks are add-ons. An unentitled feature shows no data rather than an error in most tiles. +- **A failed Cloudflare query can look like "no data".** Cloudflare answers a failed GraphQL query with HTTP 200 and an `errors` array, which the platform does not treat as a failure. Streams that use a post-request script raise these errors explicitly, but the simpler declarative streams will show an empty tile instead of an error message. +- **Costs are unitless.** Cloudflare's AI Gateway analytics reports cost without stating a currency, so the plugin shows a plain number rather than assuming one. +- **Pages Functions cannot be scoped to a single project.** Cloudflare identifies Pages Functions by an internal script name with no published mapping to the project, so this stream reports all Pages Functions in the account, with the function name as a column. +- **The first import only populates accounts and zones.** Everything below them - Workers, KV namespaces, queues, tunnels, Stream videos, Turnstile widgets and the rest - is imported by steps that run against the accounts and zones the same import has just created, and on a brand new data source those objects are not yet visible when those steps start. They are skipped with a warning, and the **next import picks them all up**. Trigger a re-import from the data source page after adding the plugin rather than waiting for the scheduled one. +- **Imports run every 12 hours** by default, so newly created zones and resources are not visible immediately. +- **Read-only.** The plugin never creates, modifies or deletes anything in Cloudflare. diff --git a/plugins/Cloudflare/v2/icon.svg b/plugins/Cloudflare/v2/icon.svg new file mode 100644 index 00000000..f5cd685b --- /dev/null +++ b/plugins/Cloudflare/v2/icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/plugins/Cloudflare/v2/indexDefinitions/default.json b/plugins/Cloudflare/v2/indexDefinitions/default.json new file mode 100644 index 00000000..ffe5b6c0 --- /dev/null +++ b/plugins/Cloudflare/v2/indexDefinitions/default.json @@ -0,0 +1,666 @@ +{ + "steps": [ + { + "name": "accounts", + "dataStream": { + "name": "accounts" + }, + "timeframe": "none", + "objectMapping": { + "id": "id", + "name": "name", + "type": { + "value": "Cloudflare Account" + }, + "properties": [ + { + "accountType": "type" + }, + { + "createdOn": "created_on" + }, + { + "abuseContactEmail": "settings.abuse_contact_email" + }, + { + "enforceTwoFactor": "settings.enforce_twofactor" + } + ] + } + }, + { + "name": "zones", + "dataStream": { + "name": "zones" + }, + "timeframe": "none", + "optional": true, + "objectMapping": { + "id": "id", + "name": "name", + "type": { + "value": "Cloudflare Zone" + }, + "properties": [ + "status", + "paused", + "accountId", + "accountName", + "planName", + "developmentModeActive", + { + "zoneType": "type" + }, + { + "createdOn": "created_on" + }, + { + "activatedOn": "activated_on" + }, + "nameServers" + ] + } + }, + { + "name": "workerScripts", + "dataStream": { + "name": "workerScripts" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "scriptName", + "type": { + "value": "Cloudflare Worker" + }, + "properties": [ + "accountId", + "usageModel", + "handlers", + "placementMode", + "logpush", + "createdOn", + "modifiedOn" + ] + } + }, + { + "name": "r2Buckets", + "dataStream": { + "name": "r2Buckets" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "bucketName", + "type": { + "value": "Cloudflare R2 Bucket" + }, + "properties": [ + "accountId", + "location", + "storageClass", + "createdOn" + ] + } + }, + { + "name": "pagesProjects", + "dataStream": { + "name": "pagesProjects" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "projectName", + "type": { + "value": "Cloudflare Pages Project" + }, + "properties": [ + "accountId", + "subdomain", + "domains", + "primaryDomain", + "productionBranch", + "latestDeploymentStatus", + "latestDeploymentOn", + "createdOn" + ] + } + }, + { + "name": "d1Databases", + "dataStream": { + "name": "d1Databases" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "databaseName", + "type": { + "value": "Cloudflare D1 Database" + }, + "properties": [ + "accountId", + "version", + "numTables", + "fileSize", + "createdOn" + ] + } + }, + { + "name": "kvNamespaces", + "dataStream": { + "name": "kvNamespaces" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "namespaceTitle", + "type": { + "value": "Cloudflare KV Namespace" + }, + "properties": [ + "accountId", + "supportsUrlEncoding" + ] + } + }, + { + "name": "queues", + "dataStream": { + "name": "queues" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "queueName", + "type": { + "value": "Cloudflare Queue" + }, + "properties": [ + "accountId", + "producers", + "consumers", + "createdOn", + "modifiedOn", + "consumerScripts", + "primaryConsumerScript", + "producerScripts", + "primaryProducerScript" + ] + } + }, + { + "name": "tunnels", + "dataStream": { + "name": "tunnels" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "tunnelName", + "type": { + "value": "Cloudflare Tunnel" + }, + "properties": [ + "accountId", + "status", + "tunnelType", + "activeConnections", + "createdOn" + ] + } + }, + { + "name": "loadBalancerPools", + "dataStream": { + "name": "loadBalancerPools" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "poolName", + "type": { + "value": "Cloudflare Load Balancer Pool" + }, + "properties": [ + "accountId", + "enabled", + "originCount", + "minimumOrigins", + "monitorId", + "createdOn", + "modifiedOn" + ] + } + }, + { + "name": "accessApps", + "dataStream": { + "name": "accessApps" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "appName", + "type": { + "value": "Cloudflare Access Application" + }, + "properties": [ + "accountId", + "domain", + "appType", + "sessionDuration", + "appLauncherVisible", + "createdOn", + "modifiedOn" + ] + } + }, + { + "name": "durableObjectNamespaces", + "dataStream": { + "name": "durableObjectNamespaces" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "namespaceName", + "type": { + "value": "Cloudflare Durable Object Namespace" + }, + "properties": [ + "accountId", + "scriptName", + "className", + "usesSqlite" + ] + } + }, + { + "name": "vectorizeIndexes", + "dataStream": { + "name": "vectorizeIndexes" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "indexName", + "type": { + "value": "Cloudflare Vectorize Index" + }, + "properties": [ + "accountId", + "dimensions", + "metric", + "createdOn", + "modifiedOn" + ] + } + }, + { + "name": "hyperdriveConfigs", + "dataStream": { + "name": "hyperdriveConfigs" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "configName", + "type": { + "value": "Cloudflare Hyperdrive Config" + }, + "properties": [ + "accountId", + "database", + "host", + "scheme", + "cachingDisabled" + ] + } + }, + { + "name": "workerRoutes", + "dataStream": { + "name": "workerRoutes" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Zone\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "zones" + ], + "objectMapping": { + "id": "sourceId", + "name": "pattern", + "type": { + "value": "Cloudflare Worker Route" + }, + "properties": [ + "accountId", + "zoneId", + "zoneName", + "scriptName" + ] + } + }, + { + "name": "workerBindings", + "dataStream": { + "name": "workerBindings" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Worker\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "workerScripts" + ], + "objectMapping": { + "id": "sourceId", + "name": "bindingName", + "type": { + "value": "Cloudflare Worker Binding" + }, + "properties": [ + "bindingType", + "scriptName", + "accountId", + "kvNamespaceId", + "r2BucketName", + "d1DatabaseId", + "queueName", + "durableObjectNamespaceId", + "vectorizeIndexName", + "hyperdriveConfigId", + "serviceName" + ] + } + }, + { + "name": "streamVideos", + "dataStream": { + "name": "streamVideos" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "videoName", + "type": { + "value": "Cloudflare Stream Video" + }, + "properties": [ + "accountId", + "statusState", + "duration", + "size", + "readyToStream", + "createdOn", + "preview" + ] + } + }, + { + "name": "turnstileWidgets", + "dataStream": { + "name": "turnstileWidgets" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "widgetName", + "type": { + "value": "Cloudflare Turnstile Widget" + }, + "properties": [ + "accountId", + "mode", + "region", + "domains", + "primaryDomain", + "botFightMode", + "createdOn", + "modifiedOn" + ] + } + }, + { + "name": "aiGateways", + "dataStream": { + "name": "aiGateways" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "gatewayName", + "type": { + "value": "Cloudflare AI Gateway" + }, + "properties": [ + "accountId", + "cacheTtl", + "rateLimitingLimit", + "collectLogs", + "createdOn" + ] + } + }, + { + "name": "autoragInstances", + "dataStream": { + "name": "autoragInstances" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "ragName", + "type": { + "value": "Cloudflare AutoRAG" + }, + "properties": [ + "accountId", + "status", + "source", + "createdOn" + ] + } + }, + { + "name": "containerApps", + "dataStream": { + "name": "containerApps" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "appName", + "type": { + "value": "Cloudflare Container Application" + }, + "properties": [ + "accountId", + "instances", + "imageName", + "schedulingPolicy", + "createdOn" + ] + } + }, + { + "name": "pipelines", + "dataStream": { + "name": "pipelines" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "pipelineName", + "type": { + "value": "Cloudflare Pipeline" + }, + "properties": [ + "accountId", + "endpoint", + "createdOn" + ] + } + }, + { + "name": "realtimeApps", + "dataStream": { + "name": "realtimeApps" + }, + "scope": { + "query": "g.V().has(\"sourceType\", \"Cloudflare Account\")" + }, + "timeframe": "none", + "optional": true, + "dependsOn": [ + "accounts" + ], + "objectMapping": { + "id": "sourceId", + "name": "appName", + "type": { + "value": "Cloudflare Realtime App" + }, + "properties": [ + "accountId", + "createdOn", + "modifiedOn" + ] + } + } + ] +} diff --git a/plugins/Cloudflare/v2/metadata.json b/plugins/Cloudflare/v2/metadata.json new file mode 100644 index 00000000..eb6afe1a --- /dev/null +++ b/plugins/Cloudflare/v2/metadata.json @@ -0,0 +1,98 @@ +{ + "name": "cloudflare", + "displayName": "Cloudflare", + "version": "2.0.0", + "author": { + "name": "@clarkd", + "type": "community" + }, + "description": "Monitor your Cloudflare account in SquaredUp - zone traffic, cache performance, firewall and WAF events, DNS records and SSL certificate expiry, plus Workers, R2, KV, D1, Queues, Pages, Tunnels, Load Balancers and Access applications.", + "category": "Cloud Platforms", + "type": "hybrid", + "schemaVersion": "2.1", + "importNotSupported": false, + "restrictedToPlatforms": [], + "keywords": [ + "cloudflare", + "cdn", + "dns", + "waf", + "firewall", + "zones", + "workers", + "r2", + "kv", + "d1", + "queues", + "pages", + "tunnel", + "zero trust", + "access", + "load balancing", + "ssl", + "analytics", + "durable objects", + "vectorize", + "hyperdrive", + "ai", + "stream", + "images", + "turnstile", + "autorag", + "containers", + "pipelines", + "realtime", + "media" + ], + "objectTypes": [ + "Cloudflare Account", + "Cloudflare Zone", + "Cloudflare Worker", + "Cloudflare R2 Bucket", + "Cloudflare Pages Project", + "Cloudflare D1 Database", + "Cloudflare KV Namespace", + "Cloudflare Queue", + "Cloudflare Tunnel", + "Cloudflare Load Balancer Pool", + "Cloudflare Access Application", + "Cloudflare Durable Object Namespace", + "Cloudflare Vectorize Index", + "Cloudflare Hyperdrive Config", + "Cloudflare Worker Route", + "Cloudflare Worker Binding", + "Cloudflare Stream Video", + "Cloudflare Turnstile Widget", + "Cloudflare AI Gateway", + "Cloudflare AutoRAG", + "Cloudflare Container Application", + "Cloudflare Pipeline", + "Cloudflare Realtime App" + ], + "links": [ + { + "category": "documentation", + "url": "https://github.com/squaredup/plugins/blob/main/plugins/Cloudflare/v2/docs/README.md", + "label": "Help adding this plugin" + }, + { + "category": "source", + "url": "https://github.com/squaredup/plugins/tree/main/plugins/Cloudflare", + "label": "Repository" + } + ], + "base": { + "plugin": "WebAPI", + "majorVersion": "1", + "config": { + "baseUrl": "https://api.cloudflare.com/client/v4", + "authMode": "none", + "headers": [ + { + "key": "Authorization", + "value": "Bearer {{apiToken}}" + } + ] + } + } +} diff --git a/plugins/Cloudflare/v2/ui.json b/plugins/Cloudflare/v2/ui.json new file mode 100644 index 00000000..9cfb68fc --- /dev/null +++ b/plugins/Cloudflare/v2/ui.json @@ -0,0 +1,10 @@ +[ + { + "type": "password", + "name": "apiToken", + "label": "API token", + "placeholder": "Enter the Cloudflare API token", + "help": "Create a custom token at [My Profile → API Tokens](https://dash.cloudflare.com/profile/api-tokens) with **Read** access to the accounts, zones and products you want to monitor - the [setup guide](https://github.com/squaredup/plugins/blob/main/plugins/Cloudflare/v2/docs/README.md) lists the exact permissions. Legacy Global API Keys are not supported.", + "validation": { "required": true } + } +]