diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f7193eff..ae8b3dfe 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,6 +10,7 @@ /plugins/Algolia/ @andrewmumblebee /plugins/AutoTask/ @TimWheeler-SQUP /plugins/Checkmk/ @shawn149 +/plugins/Cloudflare/ @clarkd /plugins/CodeRabbit/ @TimWheeler-SQUP /plugins/DattoRMM/ @TimWheeler-SQUP /plugins/DigiCert/ @shaswot77 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..94049b5e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/accessLogins.json @@ -0,0 +1,69 @@ +{ + "name": "accessLogins", + "displayName": "Access Logins", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){accessLoginRequestsAdaptiveGroups(limit:10000,filter:{appId:$appId,datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} identityProvider isSuccessfulLogin country hasWarpEnabled}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "appId": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/accountTraffic.json b/plugins/Cloudflare/v2/dataStreams/accountTraffic.json new file mode 100644 index 00000000..353e833f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/accountTraffic.json @@ -0,0 +1,135 @@ +{ + "name": "accountTraffic", + "displayName": "Account Traffic", + "description": "HTTP requests, bandwidth and visits across every zone in an account, grouped by zone or another selectable dimension", + "tags": [ + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){httpRequestsAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count sum{edgeResponseBytes visits} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown || 'zoneTag'}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "accountTraffic.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": "zoneTag", + "options": [ + { + "value": "zoneTag", + "label": "Zone" + }, + { + "value": "clientCountryName", + "label": "Country" + }, + { + "value": "edgeResponseStatus", + "label": "Status Code" + }, + { + "value": "cacheStatus", + "label": "Cache Status" + }, + { + "value": "clientRequestHTTPHost", + "label": "Host" + }, + { + "value": "clientDeviceType", + "label": "Device Type" + } + ] + } + ], + "metadata": [ + { + "name": "datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "zoneTag", + "displayName": "Zone Tag", + "shape": "string", + "visible": false + }, + { + "name": "zoneName", + "displayName": "Zone", + "sourceId": "zoneTag", + "sourceType": "Cloudflare Zone", + "objectPropertyPath": "name", + "shape": "string" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "bytes", + "displayName": "Bandwidth", + "shape": "bytes" + }, + { + "name": "visits", + "displayName": "Visits", + "shape": "number" + }, + { + "name": "accountName", + "displayName": "Account", + "shape": "string", + "sourceId": "accountId", + "sourceType": "Cloudflare Account" + }, + { + "name": "accountId", + "displayName": "Account ID", + "shape": "string", + "visible": false + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} 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..e3078146 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayCache.json @@ -0,0 +1,56 @@ +{ + "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayCacheAdaptiveGroups(limit:10000,filter:{gateway:$gateway,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} cacheOp}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json b/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json new file mode 100644 index 00000000..927643ae --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayErrors.json @@ -0,0 +1,70 @@ +{ + "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayErrorsAdaptiveGroups(limit:10000,filter:{gateway:$gateway,datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json b/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json new file mode 100644 index 00000000..7a8c1438 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/aiGatewayRequests.json @@ -0,0 +1,142 @@ +{ + "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){aiGatewayRequestsAdaptiveGroups(limit:10000,filter:{gateway:$gateway,datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}} sum{cost tokensIn tokensOut totalTokens cachedRequests erroredRequests} quantiles{durationMsP50 durationMsP95}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "gateway": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..58e31f6d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/auditLogs.json @@ -0,0 +1,81 @@ +{ + "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:[count_DESC]){actionCount: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "actionCount", + "displayName": "Action Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter", + "lastQuarter" + ] +} 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..42de5335 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/autoragQueries.json @@ -0,0 +1,82 @@ +{ + "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){aiSearchAPIAdaptiveGroups(limit:10000,filter:{instanceId:$instanceId,datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){count sum{aiSearchCount searchCount} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "instanceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/browserRendering.json b/plugins/Cloudflare/v2/dataStreams/browserRendering.json new file mode 100644 index 00000000..13a0d31e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/browserRendering.json @@ -0,0 +1,95 @@ +{ + "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:[count_DESC]){count avg{avgConcurrentSessions} min{startTime: earliestBrowserStartTime} max{endTime: latestBrowserEndTime} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} sessionId {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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", + "computed": true, + "valueExpression": "{{ $['startTime'] && $['endTime'] ? new Date($['endTime']).getTime() - new Date($['startTime']).getTime() : null }}", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/cacheReserveOperations.json b/plugins/Cloudflare/v2/dataStreams/cacheReserveOperations.json new file mode 100644 index 00000000..b5f110d9 --- /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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){sum{operationCount: requests}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json b/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json new file mode 100644 index 00000000..a85dbd36 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/cacheReserveStorage.json @@ -0,0 +1,49 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){max{objectCount storedBytes}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..5293cc30 --- /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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){count avg{avgCpuUtilization: cpuUtilization avgMemory: memory avgContainerUptimeMs: containerUptime} sum{sumRxBytes: rxBytes sumTxBytes: txBytes} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "applicationId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Analytics.json b/plugins/Cloudflare/v2/dataStreams/d1Analytics.json new file mode 100644 index 00000000..357801b2 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Analytics.json @@ -0,0 +1,83 @@ +{ + "name": "d1Analytics", + "displayName": "D1 Queries", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){d1AnalyticsAdaptiveGroups(limit:10000,filter:{databaseId:$databaseId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{readQueries writeQueries rowsRead rowsWritten queryBatchResponseBytes}quantiles{queryBatchTimeMsP50 queryBatchTimeMsP90 queryBatchTimeMsP99}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..fd592a7a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Queries.json @@ -0,0 +1,88 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){count sum{rowsRead rowsWritten rowsReturned}quantiles{queryDurationMsP50 queryDurationMsP95 queryDurationMsP99}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} databaseRole}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/d1Storage.json b/plugins/Cloudflare/v2/dataStreams/d1Storage.json new file mode 100644 index 00000000..670c3ba9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/d1Storage.json @@ -0,0 +1,48 @@ +{ + "name": "d1Storage", + "displayName": "D1 Storage", + "description": "Stored size of a D1 database", + "tags": ["Database"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$databaseId:string,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){d1StorageAdaptiveGroups(limit:10000,filter:{databaseId:$databaseId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){max{databaseSizeBytes}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "databaseId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.databaseSizeBytes", + "displayName": "Database Size", + "shape": "bytes", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/dmarcReports.json b/plugins/Cloudflare/v2/dataStreams/dmarcReports.json new file mode 100644 index 00000000..33717fe3 --- /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:[sum_totalMatchingMessages_DESC]){sum{messageCount: totalMatchingMessages} avg{dmarcPassRate: dmarc} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json b/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json new file mode 100644 index 00000000..c66b0e9d --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/dnsFirewallAnalytics.json @@ -0,0 +1,77 @@ +{ + "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:[count_DESC]){queries: count quantiles{processingTimeUsP50} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queries", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "processingTimeUsP50", + "displayName": "Median processing time (µs)", + "shape": "number", + "visible": false + }, + { + "name": "medianProcessingTimeMs", + "displayName": "Median Processing Time", + "computed": true, + "valueExpression": "{{ $['processingTimeUsP50'] === undefined || $['processingTimeUsP50'] === null ? null : $['processingTimeUsP50'] / 1000 }}", + "shape": "milliseconds" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectActivity.json b/plugins/Cloudflare/v2/dataStreams/durableObjectActivity.json new file mode 100644 index 00000000..35402b3c --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectActivity.json @@ -0,0 +1,130 @@ +{ + "name": "durableObjectActivity", + "displayName": "Durable Object Activity", + "description": "Active time, CPU time, storage operations, errors and memory for a Durable Object namespace", + "tags": [ + "Compute", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$namespaceId:string!){viewer{accounts(filter:{accountTag:$accountTag}){durableObjectsPeriodicGroups(limit:10000,filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{activeTime cpuTime rowsRead rowsWritten storageReadUnits storageWriteUnits subrequests exceededCpuErrors exceededMemoryErrors fatalInternalErrors} max{activeWebsocketConnections memoryUsageBytes} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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.activeTime", + "displayName": "Active time (µs)", + "shape": "number", + "visible": false + }, + { + "name": "activeTimeMs", + "displayName": "Active Time", + "computed": true, + "valueExpression": "{{ $['sum.activeTime'] === undefined || $['sum.activeTime'] === null ? null : $['sum.activeTime'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "sum.cpuTime", + "displayName": "CPU time (µs)", + "shape": "number", + "visible": false + }, + { + "name": "cpuTimeMs", + "displayName": "CPU Time", + "computed": true, + "valueExpression": "{{ $['sum.cpuTime'] === undefined || $['sum.cpuTime'] === null ? null : $['sum.cpuTime'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "sum.rowsRead", + "displayName": "Rows Read", + "shape": "number" + }, + { + "name": "sum.rowsWritten", + "displayName": "Rows Written", + "shape": "number" + }, + { + "name": "sum.storageReadUnits", + "displayName": "Storage Read Units", + "shape": "number" + }, + { + "name": "sum.storageWriteUnits", + "displayName": "Storage Write Units", + "shape": "number" + }, + { + "name": "sum.subrequests", + "displayName": "Subrequests", + "shape": "number" + }, + { + "name": "sum.exceededCpuErrors", + "displayName": "CPU Limit Errors", + "shape": "number" + }, + { + "name": "sum.exceededMemoryErrors", + "displayName": "Memory Limit Errors", + "shape": "number" + }, + { + "name": "sum.fatalInternalErrors", + "displayName": "Internal Errors", + "shape": "number" + }, + { + "name": "max.activeWebsocketConnections", + "displayName": "Peak WebSocket Connections", + "shape": "number" + }, + { + "name": "max.memoryUsageBytes", + "displayName": "Peak Memory", + "shape": "bytes" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json b/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json new file mode 100644 index 00000000..a613736b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectInvocations.json @@ -0,0 +1,109 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requests errors responseBodySize wallTime}quantiles{wallTimeP50 wallTimeP90 wallTimeP99}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} status}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..565a30a5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectStorage.json @@ -0,0 +1,48 @@ +{ + "name": "durableObjectStorage", + "displayName": "Durable Object Storage", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){durableObjectsSqlStorageGroups(limit:10000,filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){max{storedBytes}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.storedBytes", + "displayName": "Storage Size", + "shape": "bytes", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json b/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json new file mode 100644 index 00000000..3ca5dc96 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/durableObjectSubrequests.json @@ -0,0 +1,53 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requestBodySizeUncached}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/emailRouting.json b/plugins/Cloudflare/v2/dataStreams/emailRouting.json new file mode 100644 index 00000000..8c791dec --- /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:[count_DESC]){messageCount: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "messageCount", + "displayName": "Message Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/gatewayDnsQueries.json b/plugins/Cloudflare/v2/dataStreams/gatewayDnsQueries.json new file mode 100644 index 00000000..6b387f08 --- /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]){queryCount: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queryCount", + "displayName": "Query Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/gatewayHttpRequests.json b/plugins/Cloudflare/v2/dataStreams/gatewayHttpRequests.json new file mode 100644 index 00000000..08b3a653 --- /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:[count_DESC]){requests: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "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..256dd99c --- /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]){sessionCount: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "sessionCount", + "displayName": "Session Count", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "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..de7cecfe --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/graphqlQuery.json @@ -0,0 +1,89 @@ +{ + "name": "graphqlQuery", + "displayName": "GraphQL Query", + "description": "Rows returned by a Cloudflare GraphQL Analytics query you write, optionally for a chosen zone or account", + "tags": [ + "Analytics" + ], + "baseDataSourceName": "httpRequestUnscoped", + "manualConfigApply": true, + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "{{query}}", + "variables": "{{ ((u) => { const picked = typeof target !== 'undefined' && Array.isArray(target) ? target : []; const zones = picked.filter((o) => u(o.sourceType) === 'Cloudflare Zone'); const account = picked.find((o) => u(o.sourceType) === 'Cloudflare Account'); const fromTarget = {}; if (zones.length) { fromTarget.zoneTag = u(zones[0].rawId); fromTarget.zoneTags = zones.map((o) => u(o.rawId)); fromTarget.accountTag = u(zones[0].accountId); } if (account) fromTarget.accountTag = u(account.rawId); const fromTimeframe = typeof timeframe !== 'undefined' && timeframe && timeframe.start ? { start: timeframe.start, end: timeframe.end, startDate: timeframe.start.split('T')[0], endDate: timeframe.end.split('T')[0] } : {}; const own = typeof variables === 'string' ? JSON.parse(variables || '{}') : variables || {}; return Object.assign(fromTimeframe, fromTarget, own); })(((v) => (Array.isArray(v) ? v[0] : v))) }}" + }, + "postRequestScript": "graphqlQuery.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": "none", + "ui": [ + { + "type": "objects", + "name": "target", + "label": "Zone or account (optional)", + "placeholder": "Select...", + "searchPlaceholder": "Search...", + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone", + "Cloudflare Account" + ] + } + } + }, + { + "type": "code", + "name": "query", + "label": "GraphQL query", + "language": "graphql", + "help": "Declare any of these variables to use them: `$start` / `$end` (`Time!`) and `$startDate` / `$endDate` (`Date!`) from the timeframe (not sent with the **None** timeframe), and `$zoneTag`, `$zoneTags` (`[string!]`) and `$accountTag` (`string`) from the selected zone or account. Each dataset limits how wide a timeframe it accepts; a wider one fails with the limit named. See the [GraphQL Analytics docs](https://developers.cloudflare.com/analytics/graphql-api/).", + "defaultValue": "query ($zoneTag: string, $start: Time!, $end: Time!) {\n viewer {\n zones(filter: { zoneTag: $zoneTag }, 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 variables as a JSON object, for example `{ \"limit\": 50 }`. A value here overrides the built-in variable of the same name.", + "defaultValue": {} + }, + { + "type": "text", + "name": "pathToData", + "label": "Path to rows", + "placeholder": "Automatic", + "help": "Leave empty to use the first array of rows in the response. Set a dot path, such as `data.viewer.zones.0.httpRequests1hGroups`, when the query reads several datasets or zones." + } + ], + "metadata": [ + { + "pattern": ".*" + } + ], + "supportsNoneTimeframe": true, + "timeframes": [ + "none", + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter", + "lastQuarter", + "thisYear", + "lastYear" + ] +} 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/hyperdrivePoolSizes.json b/plugins/Cloudflare/v2/dataStreams/hyperdrivePoolSizes.json new file mode 100644 index 00000000..b8e7c17b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/hyperdrivePoolSizes.json @@ -0,0 +1,82 @@ +{ + "name": "hyperdrivePoolSizes", + "displayName": "Hyperdrive Connection Pool", + "description": "Connection pool size, free slots and waiting clients for a Hyperdrive config", + "tags": [ + "Storage", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$configId:string!){viewer{accounts(filter:{accountTag:$accountTag}){hyperdrivePoolSizesAdaptiveGroups(limit:10000,filter:{configId:$configId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){avg{currentPoolSize availablePoolSlots waitingClients} max{maxPoolSize waitingClients} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "configId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Hyperdrive Config" + ] + } + }, + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "avg.currentPoolSize", + "displayName": "Pool Size", + "shape": "number", + "role": "value", + "decimalPlaces": 1 + }, + { + "name": "avg.availablePoolSlots", + "displayName": "Free Slots", + "shape": "number", + "decimalPlaces": 1 + }, + { + "name": "avg.waitingClients", + "displayName": "Waiting Clients", + "shape": "number", + "decimalPlaces": 1 + }, + { + "name": "max.waitingClients", + "displayName": "Peak Waiting Clients", + "shape": "number" + }, + { + "name": "max.maxPoolSize", + "displayName": "Pool Limit", + "shape": "number" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json b/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json new file mode 100644 index 00000000..3b16ec48 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/hyperdriveQueries.json @@ -0,0 +1,53 @@ +{ + "name": "hyperdriveQueries", + "displayName": "Hyperdrive Queries", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){hyperdriveQueriesAdaptiveGroups(limit:10000,filter:{configId:$configId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count avg{queryLatency} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "configId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "avg.queryLatency", + "displayName": "Avg Query Latency", + "shape": "milliseconds" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/imagesRequests.json b/plugins/Cloudflare/v2/dataStreams/imagesRequests.json new file mode 100644 index 00000000..480a7ade --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/imagesRequests.json @@ -0,0 +1,44 @@ +{ + "name": "imagesRequests", + "displayName": "Images Requests", + "description": "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){sum{requests}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Account"] } + }, + "metadata": [ + { + "name": "date", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/imagesTransformations.json b/plugins/Cloudflare/v2/dataStreams/imagesTransformations.json new file mode 100644 index 00000000..9e4ea059 --- /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": "graphqlFlatRows.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", "thisMonth"] +} 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..33d141a7 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/kvOperations.json @@ -0,0 +1,65 @@ +{ + "name": "kvOperations", + "displayName": "KV Operations", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){kvOperationsAdaptiveGroups(limit:10000,filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_DESC]){sum{requests}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} actionType}quantiles{latencyMsP50 latencyMsP90 latencyMsP99}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare KV Namespace"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/kvStorage.json b/plugins/Cloudflare/v2/dataStreams/kvStorage.json new file mode 100644 index 00000000..f623e7fa --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/kvStorage.json @@ -0,0 +1,49 @@ +{ + "name": "kvStorage", + "displayName": "KV Storage", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){kvStorageAdaptiveGroups(filter:{namespaceId:$namespaceId,datetime_geq:$start,datetime_leq:$end},limit:10000,orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_DESC]){max{keyCount byteCount}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "namespaceId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare KV Namespace"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.keyCount", + "displayName": "Keys", + "shape": "number", + "role": "value" + }, + { + "name": "max.byteCount", + "displayName": "Size", + "shape": "bytes" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..a22d63a1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pagesFunctionsInvocations.json @@ -0,0 +1,77 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requests errors subrequests}quantiles{cpuTimeP50 cpuTimeP99}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} scriptName status}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..7f40a8d7 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/pipelineIngestion.json @@ -0,0 +1,58 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count sum{ingestedBytes ingestedRecords} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "pipelineId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": ["Cloudflare Pipeline"] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..9ee00876 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueBacklog.json @@ -0,0 +1,50 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){avg{messages bytes}dimensions{datetimeHour: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json b/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json new file mode 100644 index 00000000..2a115319 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueConsumerMetrics.json @@ -0,0 +1,53 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){avg{concurrency}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueDelayedBacklog.json b/plugins/Cloudflare/v2/dataStreams/queueDelayedBacklog.json new file mode 100644 index 00000000..1355c587 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueDelayedBacklog.json @@ -0,0 +1,61 @@ +{ + "name": "queueDelayedBacklog", + "displayName": "Queue Delayed Backlog", + "description": "Average number of delayed messages waiting in a queue", + "tags": [ + "Storage", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$queueId:string!){viewer{accounts(filter:{accountTag:$accountTag}){queueDelayedBacklogAdaptiveGroups(limit:10000,filter:{queueId:$queueId,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){avg{messages} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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.messages", + "displayName": "Delayed Messages", + "shape": "number", + "role": "value", + "decimalPlaces": 1 + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json b/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json new file mode 100644 index 00000000..0a075631 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queueMessageOperations.json @@ -0,0 +1,94 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){count sum{billableOperations bytes}avg{lagTime retryCount}max{messageSize}dimensions{datetimeHour: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} actionType outcome consumerType}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "queueId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/queues.json b/plugins/Cloudflare/v2/dataStreams/queues.json new file mode 100644 index 00000000..55e32f48 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/queues.json @@ -0,0 +1,111 @@ +{ + "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", + "sourceId": "primaryConsumerSourceId", + "sourceType": "Cloudflare Worker" + }, + { + "name": "primaryConsumerSourceId", + "displayName": "Primary Consumer ID", + "shape": "string", + "visible": false + }, + { + "name": "producerScripts", + "displayName": "Producer Workers", + "shape": "string" + }, + { + "name": "primaryProducerScript", + "displayName": "Primary Producer", + "shape": "string", + "sourceId": "primaryProducerSourceId", + "sourceType": "Cloudflare Worker" + }, + { + "name": "primaryProducerSourceId", + "displayName": "Primary Producer ID", + "shape": "string", + "visible": false + } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/r2Bandwidth.json b/plugins/Cloudflare/v2/dataStreams/r2Bandwidth.json new file mode 100644 index 00000000..6d00be10 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Bandwidth.json @@ -0,0 +1,64 @@ +{ + "name": "r2Bandwidth", + "displayName": "R2 Bandwidth", + "description": "Bytes downloaded from and uploaded to an R2 bucket", + "tags": [ + "Storage", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$bucketName:string!){viewer{accounts(filter:{accountTag:$accountTag}){r2BandwidthUsageAdaptiveGroups(limit:10000,filter:{bucketName:$bucketName,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){sum{bytesDownload bytesUpload} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "bucketName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "sum.bytesDownload", + "displayName": "Downloaded", + "shape": "bytes", + "role": "value" + }, + { + "name": "sum.bytesUpload", + "displayName": "Uploaded", + "shape": "bytes" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} 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..9517d061 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Operations.json @@ -0,0 +1,61 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : 'date' }}_ASC]){sum{requests responseBytes}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : 'date' }} actionType actionStatus}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "bucketName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/r2Storage.json b/plugins/Cloudflare/v2/dataStreams/r2Storage.json new file mode 100644 index 00000000..865bcf51 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/r2Storage.json @@ -0,0 +1,60 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){max{objectCount payloadSize metadataSize uploadCount}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "bucketName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..3035ecad --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/realtimeUsage.json @@ -0,0 +1,59 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){sum{egressBytes ingressBytes} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} trackType}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "appId": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/rumPageLoadTiming.json b/plugins/Cloudflare/v2/dataStreams/rumPageLoadTiming.json new file mode 100644 index 00000000..9b552fda --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/rumPageLoadTiming.json @@ -0,0 +1,145 @@ +{ + "name": "rumPageLoadTiming", + "displayName": "Web Analytics Page Load Timing", + "description": "P75 page load timing breakdown (DNS, connection, request, response, first contentful paint, page load) for a zone's hostnames", + "tags": [ + "Zone", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$zoneName:string!,$subdomains:string!){viewer{accounts(filter:{accountTag:$accountTag}){rumPerformanceEventsAdaptiveGroups(limit:10000,filter:{OR:[{requestHost:$zoneName},{requestHost_like:$subdomains}],datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count sum{visits} quantiles{dnsTimeP75 connectionTimeP75 requestTimeP75 responseTimeP75 firstContentfulPaintP75 pageLoadTimeP75} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "zoneName": "{{object.name}}", + "subdomains": "{{'%.' + object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Page Loads", + "shape": "number", + "role": "value" + }, + { + "name": "sum.visits", + "displayName": "Visits", + "shape": "number" + }, + { + "name": "dnsTime", + "displayName": "DNS P75", + "computed": true, + "valueExpression": "{{ $['quantiles.dnsTimeP75'] === undefined || $['quantiles.dnsTimeP75'] === null ? null : $['quantiles.dnsTimeP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "connectionTime", + "displayName": "Connection P75", + "computed": true, + "valueExpression": "{{ $['quantiles.connectionTimeP75'] === undefined || $['quantiles.connectionTimeP75'] === null ? null : $['quantiles.connectionTimeP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "requestTime", + "displayName": "Request P75", + "computed": true, + "valueExpression": "{{ $['quantiles.requestTimeP75'] === undefined || $['quantiles.requestTimeP75'] === null ? null : $['quantiles.requestTimeP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "responseTime", + "displayName": "Response P75", + "computed": true, + "valueExpression": "{{ $['quantiles.responseTimeP75'] === undefined || $['quantiles.responseTimeP75'] === null ? null : $['quantiles.responseTimeP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "firstContentfulPaint", + "displayName": "First Contentful Paint P75", + "computed": true, + "valueExpression": "{{ $['quantiles.firstContentfulPaintP75'] === undefined || $['quantiles.firstContentfulPaintP75'] === null ? null : $['quantiles.firstContentfulPaintP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "pageLoadTime", + "displayName": "Page Load P75", + "computed": true, + "valueExpression": "{{ $['quantiles.pageLoadTimeP75'] === undefined || $['quantiles.pageLoadTimeP75'] === null ? null : $['quantiles.pageLoadTimeP75'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "quantiles.dnsTimeP75", + "displayName": "dnsTimeP75", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.connectionTimeP75", + "displayName": "connectionTimeP75", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.requestTimeP75", + "displayName": "requestTimeP75", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.responseTimeP75", + "displayName": "responseTimeP75", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.firstContentfulPaintP75", + "displayName": "firstContentfulPaintP75", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.pageLoadTimeP75", + "displayName": "pageLoadTimeP75", + "shape": "number", + "visible": false + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json b/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json new file mode 100644 index 00000000..934af213 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/rumPageLoads.json @@ -0,0 +1,81 @@ +{ + "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!,$zoneName:string!,$subdomains:string!){viewer{accounts(filter:{accountTag:$accountTag}){rumPageloadEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end,OR:[{requestHost:$zoneName},{requestHost_like:$subdomains}]},orderBy:[count_DESC]){pageViews: count sum{visits} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}", + "zoneName": "{{object.name}}", + "subdomains": "{{'%.' + object.name}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json b/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json new file mode 100644 index 00000000..dd865869 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/rumWebVitals.json @@ -0,0 +1,91 @@ +{ + "name": "rumWebVitals", + "displayName": "Core Web Vitals", + "description": "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!,$zoneName:string!,$subdomains:string!){viewer{accounts(filter:{accountTag:$accountTag}){rumWebVitalsEventsAdaptiveGroups(limit:5000,filter:{datetime_geq:$start,datetime_leq:$end,OR:[{requestHost:$zoneName},{requestHost_like:$subdomains}]},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}} quantiles{largestContentfulPaintP75 interactionToNextPaintP75 firstInputDelayP75 cumulativeLayoutShiftP75}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}", + "zoneName": "{{object.name}}", + "subdomains": "{{'%.' + object.name}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { + "name": "dimensions.date", + "displayName": "Time", + "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": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter" + ] +} 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/accountTraffic.js b/plugins/Cloudflare/v2/dataStreams/scripts/accountTraffic.js new file mode 100644 index 00000000..9f16696a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/accountTraffic.js @@ -0,0 +1,35 @@ +// Cloudflare answers HTTP 200 even when the GraphQL query failed, so raise the +// errors array here or the tile would show no data instead of the reason. +if (data && data.errors && data.errors.length) { + api.report.error("Cloudflare GraphQL error: " + data.errors.map((e) => e && e.message).join(" | ")); +} + +// dataStreams/scripts/accountTraffic.js +// httpRequestsAdaptiveGroups at account level covers every zone in the account in one +// query. The selected breakdown dimension is interpolated into the query, so its value +// sits under a different key per breakdown; normalise it to a stable `breakdown` column. +// When the breakdown is the zone, the zone tag is also emitted as `zoneTag`, which the +// stream's metadata resolves to the imported zone's name. + +const account = (context.objects && context.objects[0]) || {}; +const dimensionKey = (context.config && context.config.breakdown) || "zoneTag"; + +const accounts = (data && data.data && data.data.viewer && data.data.viewer.accounts) || []; +const groups = (accounts[0] || {}).httpRequestsAdaptiveGroups || []; + +result = groups.map((row) => { + const dims = row.dimensions || {}; + const sum = row.sum || {}; + const raw = dims[dimensionKey]; + const value = raw === undefined || raw === null || raw === "" ? "Unknown" : String(raw); + return { + datetime: dims.datetime, + breakdown: value, + zoneTag: dimensionKey === "zoneTag" ? value : null, + requests: Number(row.count || 0) || 0, + bytes: Number(sum.edgeResponseBytes || 0) || 0, + visits: Number(sum.visits || 0) || 0, + accountName: account.name || account.rawId || "", + accountId: account.rawId || "", + }; +}); 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/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/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/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/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/graphqlFlatRows.js b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlFlatRows.js new file mode 100644 index 00000000..73358fd7 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlFlatRows.js @@ -0,0 +1,56 @@ +// dataStreams/scripts/graphqlFlatRows.js +// Shared by the GraphQL analytics streams whose columns use plain names (date, requests, +// avgMemory) rather than the dotted names graphqlRows.js produces (dimensions.date, +// sum.requests). Each query selects a single dataset under one account or one zone, and +// names its fields with GraphQL aliases (`requests: count`, `sum{ bytes: edgeResponseBytes }`). +// This script lifts every field out of the dimensions/sum/avg/min/max/quantiles groups +// under its own (aliased) name, so the alias is the column name. Aliases must therefore +// be unique across the groups of one query. +// +// A script rather than pathToData because Cloudflare answers a failed GraphQL query with +// HTTP 200 and an `errors` array, which the declarative errorHandling never sees. + +const body = data || {}; + +const errors = Array.isArray(body.errors) ? body.errors : []; +if (errors.length) { + api.report.error( + "Cloudflare GraphQL error: " + + errors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const viewer = (body.data && body.data.viewer) || {}; +const scope = (viewer.accounts || viewer.zones || [])[0] || {}; +const rows = Object.keys(scope) + .map((key) => scope[key]) + .find((value) => Array.isArray(value)) || []; + +// Streams with a `breakdown` parameter interpolate the chosen dimension into the query. +// Its value moves to a stable `breakdown` column (list values joined, empty as "Unknown") +// and the dimension's own column is dropped, since its name changes with the selection. +const breakdownKey = context.config && context.config.breakdown; + +const label = (value) => { + if (Array.isArray(value)) value = value.join(", "); + return value === undefined || value === null || value === "" ? "Unknown" : String(value); +}; + +result = rows.map((row) => { + const out = {}; + Object.keys(row).forEach((key) => { + const value = row[key]; + if (value !== null && typeof value === "object" && !Array.isArray(value)) { + Object.keys(value).forEach((field) => { + out[field] = value[field]; + }); + } else { + out[key] = value; + } + }); + if (breakdownKey) { + out.breakdown = label(row.dimensions && row.dimensions[breakdownKey]); + delete out[breakdownKey]; + } + return out; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js new file mode 100644 index 00000000..33240e29 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlQuery.js @@ -0,0 +1,106 @@ +// 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); + const joined = messages.join(' | '); + // The default query filters on $zoneTag, which is null until a zone is selected. + if (joined.indexOf('empty zone filters') >= 0 || joined.indexOf('empty account filters') >= 0) { + throw new Error( + 'Select a zone or account in "Zone or account", or remove the $zoneTag / $accountTag filter from the query. (' + + joined + + ')' + ); + } + throw new Error('Cloudflare GraphQL error: ' + joined); +} + +// 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(); + +// With no path set, use the first array of rows that has no array of rows inside it - +// for a typical query that is data.viewer..0.. A query that +// reads several datasets or several zones needs an explicit path. +const leafArrayPath = () => { + const paths = arrayPaths(body, '', 0, []); + return paths.find((path) => !paths.some((other) => other.indexOf(path + '.') === 0)); +}; +const path = requestedPath || leafArrayPath(); + +if (!path) { + throw new Error('The query returned no array of rows.' + candidates()); +} + +// Tolerate a path written with or without the leading `data.` envelope. +let rows = walk(body, path); +if (rows === undefined) rows = walk(body.data, path); + +if (rows === undefined || rows === null) { + throw new Error('Nothing found at "' + path + '".' + 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/graphqlRows.js b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlRows.js new file mode 100644 index 00000000..b20c41de --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/graphqlRows.js @@ -0,0 +1,55 @@ +// dataStreams/scripts/graphqlRows.js +// Shared by the GraphQL analytics streams that need no shaping of their own. Each of +// those queries selects a single dataset under one account or one zone, so the rows are +// the one array found at data.viewer.[0].. +// +// A script rather than pathToData because Cloudflare answers a failed GraphQL query with +// HTTP 200 and an `errors` array, which the declarative errorHandling never sees: the +// tile would show no data instead of the reason (an unentitled feature, or a timeframe +// wider than the plan allows). +// +// Rows are flattened to dotted column names (sum.requests, dimensions.date) exactly as +// expandInnerObjects did, so the streams' metadata and dashboards are unchanged. + +const body = data || {}; + +const errors = Array.isArray(body.errors) ? body.errors : []; +if (errors.length) { + api.report.error( + "Cloudflare GraphQL error: " + + errors.map((e) => (e && e.message) || JSON.stringify(e)).join(" | ") + ); +} + +const viewer = (body.data && body.data.viewer) || {}; +const scope = (viewer.accounts || viewer.zones || [])[0] || {}; +const rows = Object.keys(scope) + .map((key) => scope[key]) + .find((value) => Array.isArray(value)) || []; + +const flatten = (value, prefix, target) => { + Object.keys(value).forEach((key) => { + const item = value[key]; + const name = prefix ? prefix + "." + key : key; + if (item !== null && typeof item === "object" && !Array.isArray(item)) { + flatten(item, name, target); + } else { + target[name] = item; + } + }); + return target; +}; + +// Streams with a `breakdown` parameter interpolate the chosen dimension into the query, +// so its column name varies (dimensions.hostname, dimensions.cacheStatus, ...). Copy it +// to a stable `breakdown` column for tiles to group on. +const breakdownKey = context.config && context.config.breakdown; + +result = rows.map((row) => { + const flat = flatten(row, "", {}); + if (breakdownKey) { + const value = row.dimensions && row.dimensions[breakdownKey]; + flat.breakdown = value === undefined || value === null || value === "" ? "Unknown" : String(value); + } + return flat; +}); 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/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..153a887e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/queues.js @@ -0,0 +1,40 @@ +// 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) || ""; +// A Worker object's sourceId is ":" (see workerScripts.js), +// so the primary producer and consumer columns can link to their Worker. +const workerSourceId = (script) => (script ? `${accountId}:${script}` : ""); + +result = ((data && data.result) || []).map((queue) => { + const consumerScripts = (queue.consumers || []).map((c) => c && c.service).filter(Boolean); + const producerScripts = (queue.producers || []).map((p) => p && p.script).filter(Boolean); + return { + 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: consumerScripts.join(", "), + primaryConsumerScript: consumerScripts[0] || "", + primaryConsumerSourceId: workerSourceId(consumerScripts[0]), + // The producing Worker script names, same display-only reasoning as consumers; + // the producer rule correlates on primaryProducerScript. + producerScripts: producerScripts.join(", "), + primaryProducerScript: producerScripts[0] || "", + primaryProducerSourceId: workerSourceId(producerScripts[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/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..194daf06 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/turnstileChallenges.js @@ -0,0 +1,55 @@ +// 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) { + // Turnstile analytics look back 7 days on the Free plan and 30 on Enterprise, so the + // stream offers Last 30 days. Name the plan limit when it rejects one. String methods + // rather than a regex: backslash escapes do not survive into the deployed script. + const message = (graphqlErrors[0] && graphqlErrors[0].message) || ""; + const marker = "cannot request a time range wider than"; + const at = message.indexOf(marker); + if (at >= 0) { + const limit = message.slice(at + marker.length).trim().split(" ")[0].split(",")[0]; + throw new Error( + "Cloudflare's Turnstile plan for this account limits analytics to a range of " + + limit + + ". Choose a shorter timeframe - Enterprise Turnstile allows up to 30 days. (" + + message + + ")" + ); + } + 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..9f5c45f2 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/workerRoutes.js @@ -0,0 +1,25 @@ +// 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, + // A Worker object's sourceId is ":" (see workerScripts.js). + workerSourceId: accountId ? `${accountId}:${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/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/zoneFirewallEventVolume.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEventVolume.js new file mode 100644 index 00000000..f0a83297 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEventVolume.js @@ -0,0 +1,36 @@ +// 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/zoneFirewallEventVolume.js +// firewallEventsAdaptiveByTimeGroups counts every firewall event and allows 30 days on +// every plan, unlike firewallEventsAdaptiveGroups behind Zone Firewall Events (1 day on +// Pro, unavailable on Free). It cannot group by action or service, only filter by them, +// so this stream is a single series over time. The query aliases the time bucket it +// chose for the timeframe to `datetime`. +// +// SquaredUp runs this stream once per zone in scope and joins the rows, so stamp the +// zone onto every row to let multi-zone tiles tell them apart. + +const zone = (context.objects && context.objects[0]) || {}; +const zoneTag = zone.rawId || ""; +const zoneName = zone.name || zoneTag; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].firewallEventsAdaptiveByTimeGroups) || + []; + +result = groups.map((row) => ({ + datetime: row.dimensions && row.dimensions.datetime, + events: Number(row.count || 0) || 0, + zoneName: zoneName, + zoneTag: zoneTag, +})); diff --git a/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js new file mode 100644 index 00000000..cf1c1391 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneFirewallEvents.js @@ -0,0 +1,62 @@ +// 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) { + const message = data.errors[0].message || ""; + // The range and history Cloudflare allows for firewall events depend on the zone's + // plan, so the stream offers timeframes only higher plans can serve. When a plan's + // limit rejects one, say so rather than surfacing the raw quota error alone. + // String methods rather than a regex: backslash escapes do not survive into the + // deployed script. + const limitText = (marker, lead) => { + const at = message.indexOf(marker); + if (at < 0) return null; + const rest = message.slice(at + marker.length).trim(); + return lead + rest.split(" ")[0].split(",")[0]; + }; + const limit = + limitText("cannot request a time range wider than", "a range of ") || + limitText("cannot request data older than", "the last "); + if (limit) { + throw new Error( + "Cloudflare's plan for this zone limits firewall events to " + + limit + + ". Choose a shorter timeframe - longer ranges need a higher Cloudflare plan. (" + + message + + ")" + ); + } + throw new Error("Cloudflare GraphQL error: " + 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/zoneTraffic.js b/plugins/Cloudflare/v2/dataStreams/scripts/zoneTraffic.js new file mode 100644 index 00000000..0ae5268f --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/scripts/zoneTraffic.js @@ -0,0 +1,48 @@ +// 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/zoneTraffic.js +// SquaredUp runs this stream once per zone in scope and joins the rows, so a tile +// scoped to several zones cannot tell which rows belong to which zone. Stamp the +// scoped zone's tag and name onto every row so tiles and SQL can group by zone. +// Column names keep the dotted form the previous expandInnerObjects config produced. +// +// The query reads httpRequests1hGroups for short timeframes and httpRequests1dGroups +// for long ones (the hourly dataset is capped at 3 days), aliasing either to `rows`. +// On the daily dataset dimensions.datetime holds a YYYY-MM-DD date. + +const zone = (context.objects && context.objects[0]) || {}; +const zoneTag = zone.rawId || ""; +const zoneName = zone.name || zoneTag; + +const groups = + (data && + data.data && + data.data.viewer && + data.data.viewer.zones && + data.data.viewer.zones[0] && + data.data.viewer.zones[0].rows) || + []; + +result = groups.map((row) => { + const sum = row.sum || {}; + const uniq = row.uniq || {}; + + return { + zoneTag: zoneTag, + zoneName: zoneName, + "dimensions.datetime": row.dimensions && row.dimensions.datetime, + "sum.requests": Number(sum.requests || 0) || 0, + "sum.cachedRequests": Number(sum.cachedRequests || 0) || 0, + "sum.bytes": Number(sum.bytes || 0) || 0, + "sum.cachedBytes": Number(sum.cachedBytes || 0) || 0, + "sum.threats": Number(sum.threats || 0) || 0, + "sum.pageViews": Number(sum.pageViews || 0) || 0, + "sum.encryptedRequests": Number(sum.encryptedRequests || 0) || 0, + "uniq.uniques": Number(uniq.uniques || 0) || 0 + }; +}); diff --git a/plugins/Cloudflare/v2/dataStreams/streamCmcd.json b/plugins/Cloudflare/v2/dataStreams/streamCmcd.json new file mode 100644 index 00000000..603c30c5 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/streamCmcd.json @@ -0,0 +1,83 @@ +{ + "name": "streamCmcd", + "displayName": "Stream Playback Quality", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){streamCMCDAdaptiveGroups(limit:10000,filter:{videoId:$videoId,datetime_geq:$start,datetime_leq:$end},orderBy:[count_DESC]){sampleCount: count avg{avgBufferingDurationMs: bufferStarvationDuration avgStartupBufferingDurationMs: initialBufferStarvationDuration avgEncodedBitrate: encodedBitrate} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "videoId": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json b/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json new file mode 100644 index 00000000..881de54e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/streamMinutesViewed.json @@ -0,0 +1,48 @@ +{ + "name": "streamMinutesViewed", + "displayName": "Stream Minutes Viewed", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){streamMinutesViewedAdaptiveGroups(limit:10000,filter:{uid:$uid,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}sum{minutesViewed}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "uid": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "sum.minutesViewed", + "displayName": "Minutes Viewed", + "shape": "minutes", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} 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..781458d6 --- /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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "siteKey": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "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": "Time", + "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", "last30days"] +} 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..ad0320a8 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/vectorizeQueries.json @@ -0,0 +1,53 @@ +{ + "name": "vectorizeQueries", + "displayName": "Vectorize Queries", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){vectorizeV2QueriesAdaptiveGroups(limit:10000,filter:{indexName:$indexName,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count avg{requestDurationMs} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "indexName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "count", + "displayName": "Queries", + "shape": "number", + "role": "value" + }, + { + "name": "avg.requestDurationMs", + "displayName": "Avg Query Latency", + "shape": "milliseconds" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json b/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json new file mode 100644 index 00000000..0f1c85cc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/vectorizeStorage.json @@ -0,0 +1,53 @@ +{ + "name": "vectorizeStorage", + "displayName": "Vectorize Storage", + "description": "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:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){vectorizeV2StorageAdaptiveGroups(limit:10000,filter:{indexName:$indexName,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){max{storedVectorDimensions vectorCount} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "indexName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "max.vectorCount", + "displayName": "Stored Vectors", + "shape": "number", + "role": "value" + }, + { + "name": "max.storedVectorDimensions", + "displayName": "Stored Vector Dimensions", + "shape": "number" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} 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/workerBuildMinutes.json b/plugins/Cloudflare/v2/dataStreams/workerBuildMinutes.json new file mode 100644 index 00000000..df9806f1 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerBuildMinutes.json @@ -0,0 +1,57 @@ +{ + "name": "workerBuildMinutes", + "displayName": "Worker Build Minutes", + "description": "Workers Builds minutes used by an account", + "tags": [ + "Compute" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!){viewer{accounts(filter:{accountTag:$accountTag}){workersBuildsBuildMinutesAdaptiveGroups(limit:10000,filter:{datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){sum{buildMinutes} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }} }}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "sum.buildMinutes", + "displayName": "Build Minutes", + "shape": "number", + "role": "value" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerCacheRequests.json b/plugins/Cloudflare/v2/dataStreams/workerCacheRequests.json new file mode 100644 index 00000000..43d8c2b9 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerCacheRequests.json @@ -0,0 +1,66 @@ +{ + "name": "workerCacheRequests", + "displayName": "Worker Cache Requests", + "description": "Cache API requests made by a Worker script by cache status", + "tags": [ + "Compute", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$scriptName:string!){viewer{accounts(filter:{accountTag:$accountTag}){workersCacheRequestsAdaptiveGroups(limit:10000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requests} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} cacheStatus }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "dimensions.cacheStatus", + "displayName": "Cache Status", + "shape": "string", + "role": "label" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerCronRuns.json b/plugins/Cloudflare/v2/dataStreams/workerCronRuns.json new file mode 100644 index 00000000..d55237ad --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerCronRuns.json @@ -0,0 +1,104 @@ +{ + "name": "workerCronRuns", + "displayName": "Worker Cron Trigger Runs", + "description": "Each scheduled (cron trigger) run of a Worker script with its schedule, outcome and CPU time", + "tags": [ + "Compute" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$scriptName:string!){viewer{accounts(filter:{accountTag:$accountTag}){workersInvocationsScheduled(limit:1000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[datetime_DESC]){datetime scheduledDatetime cron status cpuTimeUs}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker" + ] + } + }, + "metadata": [ + { + "name": "datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "scheduledDatetime", + "displayName": "Scheduled for", + "shape": "date" + }, + { + "name": "cron", + "displayName": "Schedule", + "shape": "string", + "role": "label" + }, + { + "name": "status", + "displayName": "Status", + "shape": "string" + }, + { + "name": "statusState", + "displayName": "Outcome", + "computed": true, + "valueExpression": "{{ $['status'] }}", + "shape": [ + "state", + { + "map": { + "success": [ + "success" + ], + "error": [ + "error", + "exceededCpu", + "exceededMemory", + "exceededResources", + "scriptThrewException", + "internalError", + "unknown" + ] + } + } + ] + }, + { + "name": "cpuTimeUs", + "displayName": "CPU time (µs)", + "shape": "number", + "visible": false + }, + { + "name": "cpuTime", + "displayName": "CPU Time", + "computed": true, + "valueExpression": "{{ $['cpuTimeUs'] === undefined || $['cpuTimeUs'] === null ? null : $['cpuTimeUs'] / 1000 }}", + "shape": "milliseconds" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerInvocations.json b/plugins/Cloudflare/v2/dataStreams/workerInvocations.json new file mode 100644 index 00000000..3bbe653b --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerInvocations.json @@ -0,0 +1,100 @@ +{ + "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:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requests errors subrequests}quantiles{cpuTimeP50 cpuTimeP99}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} status scriptName}}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth", "lastMonth"] +} \ 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..3dcb6f2a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerRoutes.json @@ -0,0 +1,81 @@ +{ + "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", + "sourceId": "zoneId", + "sourceType": "Cloudflare Zone" + }, + { + "name": "scriptName", + "displayName": "Worker", + "shape": "string", + "sourceId": "workerSourceId", + "sourceType": "Cloudflare Worker" + }, + { + "name": "workerSourceId", + "displayName": "Worker ID", + "shape": "string", + "visible": false + } + ], + "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/workerSmartPlacement.json b/plugins/Cloudflare/v2/dataStreams/workerSmartPlacement.json new file mode 100644 index 00000000..7815243e --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerSmartPlacement.json @@ -0,0 +1,80 @@ +{ + "name": "workerSmartPlacement", + "displayName": "Worker Smart Placement", + "description": "Requests and duration for a Worker script split by whether Smart Placement ran it near its back end", + "tags": [ + "Compute", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$scriptName:string!){viewer{accounts(filter:{accountTag:$accountTag}){workerPlacementAdaptiveGroups(limit:10000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }}_ASC]){sum{requests requestDuration} quantiles{requestDurationP50 requestDurationP99} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 619200 ? 'datetimeHour' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeSixHours' : 'date' }} placementUsed }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": "dimensions.placementUsed", + "displayName": "Placement Used", + "shape": "string", + "role": "label" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.requestDuration", + "displayName": "Total Duration", + "shape": "milliseconds" + }, + { + "name": "quantiles.requestDurationP50", + "displayName": "Duration P50", + "shape": "milliseconds" + }, + { + "name": "quantiles.requestDurationP99", + "displayName": "Duration P99", + "shape": "milliseconds" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerStaticAssets.json b/plugins/Cloudflare/v2/dataStreams/workerStaticAssets.json new file mode 100644 index 00000000..654f5c33 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerStaticAssets.json @@ -0,0 +1,88 @@ +{ + "name": "workerStaticAssets", + "displayName": "Worker Static Asset Requests", + "description": "Requests served from a Worker script's static assets, grouped by a selectable dimension", + "tags": [ + "Compute", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$scriptName:string!){viewer{accounts(filter:{accountTag:$accountTag}){workersAssetsRequestsAdaptiveGroups(limit:10000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[sum_requests_DESC]){sum{requests} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown || 'statusCode'}} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker" + ] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "statusCode", + "options": [ + { + "value": "statusCode", + "label": "Status Code" + }, + { + "value": "cacheStatus", + "label": "Cache Status" + }, + { + "value": "hostname", + "label": "Host" + } + ] + } + ], + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "sum.requests", + "displayName": "Requests", + "shape": "number", + "role": "value" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workerSubrequests.json b/plugins/Cloudflare/v2/dataStreams/workerSubrequests.json new file mode 100644 index 00000000..4f8d2b16 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workerSubrequests.json @@ -0,0 +1,129 @@ +{ + "name": "workerSubrequests", + "displayName": "Worker Subrequests", + "description": "Outbound subrequests made by a Worker script, with response time, grouped by a selectable dimension", + "tags": [ + "Compute", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($accountTag:string!,$start:Time!,$end:Time!,$scriptName:string!){viewer{accounts(filter:{accountTag:$accountTag}){workersSubrequestsAdaptiveGroups(limit:10000,filter:{scriptName:$scriptName,datetime_geq:$start,datetime_leq:$end},orderBy:[sum_subrequests_DESC]){sum{subrequests requestBodySize responseBodySize} quantiles{timeToResponseUsP50 timeToResponseUsP99} dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown || 'hostname'}} }}}}}", + "variables": { + "accountTag": "{{object.accountId}}", + "scriptName": "{{object.name}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Worker" + ] + } + }, + "ui": [ + { + "type": "choiceChips", + "name": "breakdown", + "label": "Breakdown", + "required": true, + "defaultValue": "hostname", + "options": [ + { + "value": "hostname", + "label": "Host" + }, + { + "value": "cacheStatus", + "label": "Cache Status" + }, + { + "value": "httpResponseStatus", + "label": "Status Code" + }, + { + "value": "requestOutcome", + "label": "Outcome" + } + ] + } + ], + "metadata": [ + { + "name": "dimensions.datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "sum.subrequests", + "displayName": "Subrequests", + "shape": "number", + "role": "value" + }, + { + "name": "sum.requestBodySize", + "displayName": "Request Bytes", + "shape": "bytes" + }, + { + "name": "sum.responseBodySize", + "displayName": "Response Bytes", + "shape": "bytes" + }, + { + "name": "quantiles.timeToResponseUsP50", + "displayName": "Response time P50 (µs)", + "shape": "number", + "visible": false + }, + { + "name": "quantiles.timeToResponseUsP99", + "displayName": "Response time P99 (µs)", + "shape": "number", + "visible": false + }, + { + "name": "responseTimeP50", + "displayName": "Response Time P50", + "computed": true, + "valueExpression": "{{ $['quantiles.timeToResponseUsP50'] === undefined || $['quantiles.timeToResponseUsP50'] === null ? null : $['quantiles.timeToResponseUsP50'] / 1000 }}", + "shape": "milliseconds" + }, + { + "name": "responseTimeP99", + "displayName": "Response Time P99", + "computed": true, + "valueExpression": "{{ $['quantiles.timeToResponseUsP99'] === undefined || $['quantiles.timeToResponseUsP99'] === null ? null : $['quantiles.timeToResponseUsP99'] / 1000 }}", + "shape": "milliseconds" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days", + "thisMonth", + "lastMonth" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/workersAiInference.json b/plugins/Cloudflare/v2/dataStreams/workersAiInference.json new file mode 100644 index 00000000..f286d542 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/workersAiInference.json @@ -0,0 +1,86 @@ +{ + "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:[count_DESC]){requests: count sum{inputTokens: totalInputTokens outputTokens: totalOutputTokens totalInferenceTimeMs}dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "accountTag": "{{object.rawId}}", + "start": "{{timeframe.start}}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "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": "totalInferenceTimeMs", + "displayName": "Total inference time", + "shape": "milliseconds", + "visible": false + }, + { + "name": "avgDurationMs", + "displayName": "Avg Inference Time", + "computed": true, + "valueExpression": "{{ $['requests'] > 0 ? $['totalInferenceTimeMs'] / $['requests'] : 0 }}", + "shape": ["milliseconds", { "decimalPlaces": 2 }] + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days", "thisMonth"] +} 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..da2ad6fa --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneDnsAnalytics.json @@ -0,0 +1,77 @@ +{ + "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:[count_DESC]){queryCount: count avg{processingTimeUs} dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "queryCount", + "displayName": "Query Count", + "shape": "number", + "role": "value" + }, + { + "name": "processingTimeUs", + "displayName": "Avg response time (µs)", + "shape": "number", + "visible": false + }, + { + "name": "avgResponseTimeMs", + "displayName": "Avg Response Time", + "computed": true, + "valueExpression": "{{ $['processingTimeUs'] === undefined || $['processingTimeUs'] === null ? null : $['processingTimeUs'] / 1000 }}", + "shape": "milliseconds" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days"] +} 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/zoneFirewallEventLog.json b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEventLog.json new file mode 100644 index 00000000..af0c5c96 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEventLog.json @@ -0,0 +1,280 @@ +{ + "name": "zoneFirewallEventLog", + "displayName": "Zone Firewall Event Log", + "description": "Individual firewall events for a zone, newest first, optionally filtered by action and service (latest 1,000 events, up to 30 days on every plan)", + "tags": [ + "Zone", + "Security" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$filter:ZoneFirewallEventsAdaptiveFilter_InputObject){viewer{zones(filter:{zoneTag:$zoneTag}){firewallEventsAdaptive(limit:1000,filter:$filter,orderBy:[datetime_DESC]){datetime action source description ruleId rayName clientIP clientCountryName clientASNDescription clientRequestHTTPHost clientRequestHTTPMethodName clientRequestPath userAgent edgeResponseStatus}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "filter": "{{ Object.assign({ datetime_geq: new Date((timeframe.unixStart + 60) * 1000).toISOString(), datetime_leq: timeframe.end }, (typeof actions !== 'undefined' && actions ? [].concat(typeof actions === 'string' && actions.trim().charAt(0) === '[' ? JSON.parse(actions) : actions).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []).length ? { action_in: (typeof actions !== 'undefined' && actions ? [].concat(typeof actions === 'string' && actions.trim().charAt(0) === '[' ? JSON.parse(actions) : actions).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []) } : {}, (typeof sources !== 'undefined' && sources ? [].concat(typeof sources === 'string' && sources.trim().charAt(0) === '[' ? JSON.parse(sources) : sources).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []).length ? { source_in: (typeof sources !== 'undefined' && sources ? [].concat(typeof sources === 'string' && sources.trim().charAt(0) === '[' ? JSON.parse(sources) : sources).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []) } : {}) }}" + } + }, + "postRequestScript": "graphqlFlatRows.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "ui": [ + { + "type": "autocomplete", + "name": "actions", + "label": "Action(s)", + "isMulti": true, + "isClearable": true, + "data": { + "source": "fixed", + "values": [ + { + "value": "block", + "label": "Block" + }, + { + "value": "managed_challenge", + "label": "Managed Challenge" + }, + { + "value": "challenge", + "label": "Interactive Challenge" + }, + { + "value": "jschallenge", + "label": "JS Challenge" + }, + { + "value": "connection_close", + "label": "Connection Close" + }, + { + "value": "log", + "label": "Log" + }, + { + "value": "skip", + "label": "Skip" + }, + { + "value": "bypass", + "label": "Bypass" + }, + { + "value": "allow", + "label": "Allow" + } + ] + } + }, + { + "type": "autocomplete", + "name": "sources", + "label": "Service(s)", + "isMulti": true, + "isClearable": true, + "data": { + "source": "fixed", + "values": [ + { + "value": "firewallManaged", + "label": "Managed Rules" + }, + { + "value": "firewallCustom", + "label": "Custom Rules" + }, + { + "value": "rateLimit", + "label": "Rate Limiting Rules" + }, + { + "value": "l7ddos", + "label": "HTTP DDoS Protection" + }, + { + "value": "botFight", + "label": "Bot Fight Mode" + }, + { + "value": "botManagement", + "label": "Bot Management" + }, + { + "value": "bic", + "label": "Browser Integrity Check" + }, + { + "value": "securityLevel", + "label": "Security Level" + }, + { + "value": "ip", + "label": "IP Access Rules" + }, + { + "value": "ipRange", + "label": "IP Range Access Rules" + }, + { + "value": "asn", + "label": "ASN Access Rules" + }, + { + "value": "country", + "label": "Country Access Rules" + }, + { + "value": "uaBlock", + "label": "User Agent Blocking" + }, + { + "value": "zoneLockdown", + "label": "Zone Lockdown" + }, + { + "value": "hot", + "label": "Hotlink Protection" + }, + { + "value": "validation", + "label": "Request Validation" + }, + { + "value": "apiShield", + "label": "API Shield" + }, + { + "value": "dlp", + "label": "Data Loss Prevention" + } + ] + } + } + ], + "metadata": [ + { + "name": "datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "action", + "displayName": "Action", + "shape": "string", + "role": "label" + }, + { + "name": "actionState", + "displayName": "Severity", + "computed": true, + "valueExpression": "{{ $['action'] }}", + "shape": [ + "state", + { + "map": { + "error": [ + "block", + "drop", + "connection_close" + ], + "warning": [ + "challenge", + "managed_challenge", + "jschallenge" + ], + "success": [ + "allow", + "skip", + "log", + "bypass" + ] + } + } + ] + }, + { + "name": "source", + "displayName": "Service", + "shape": "string" + }, + { + "name": "description", + "displayName": "Rule", + "shape": "string" + }, + { + "name": "ruleId", + "displayName": "Rule ID", + "shape": "string", + "visible": false + }, + { + "name": "clientIP", + "displayName": "Client IP", + "shape": "string" + }, + { + "name": "clientCountryName", + "displayName": "Country", + "shape": "string" + }, + { + "name": "clientASNDescription", + "displayName": "ASN", + "shape": "string" + }, + { + "name": "clientRequestHTTPHost", + "displayName": "Host", + "shape": "string" + }, + { + "name": "clientRequestHTTPMethodName", + "displayName": "Method", + "shape": "string" + }, + { + "name": "clientRequestPath", + "displayName": "Path", + "shape": "string" + }, + { + "name": "userAgent", + "displayName": "User Agent", + "shape": "string" + }, + { + "name": "edgeResponseStatus", + "displayName": "Status Code", + "shape": "number" + }, + { + "name": "rayName", + "displayName": "Ray ID", + "shape": "string" + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneFirewallEventVolume.json b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEventVolume.json new file mode 100644 index 00000000..580724ef --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEventVolume.json @@ -0,0 +1,204 @@ +{ + "name": "zoneFirewallEventVolume", + "displayName": "Zone Firewall Event Volume", + "description": "Firewall event counts over time for a zone, optionally filtered by action and service (up to 30 days on every plan)", + "tags": [ + "Zone", + "Security" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$filter:ZoneFirewallEventsAdaptiveByTimeGroupsFilter_InputObject){viewer{zones(filter:{zoneTag:$zoneTag}){firewallEventsAdaptiveByTimeGroups(limit:10000,filter:$filter,orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}_ASC]){count dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeMinute' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 2764800 ? 'datetimeHour' : 'date' }}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "filter": "{{ Object.assign({ datetime_geq: new Date((timeframe.unixStart + 60) * 1000).toISOString(), datetime_leq: timeframe.end }, (typeof actions !== 'undefined' && actions ? [].concat(typeof actions === 'string' && actions.trim().charAt(0) === '[' ? JSON.parse(actions) : actions).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []).length ? { action_in: (typeof actions !== 'undefined' && actions ? [].concat(typeof actions === 'string' && actions.trim().charAt(0) === '[' ? JSON.parse(actions) : actions).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []) } : {}, (typeof sources !== 'undefined' && sources ? [].concat(typeof sources === 'string' && sources.trim().charAt(0) === '[' ? JSON.parse(sources) : sources).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []).length ? { source_in: (typeof sources !== 'undefined' && sources ? [].concat(typeof sources === 'string' && sources.trim().charAt(0) === '[' ? JSON.parse(sources) : sources).map((v) => (v && v.value !== undefined ? v.value : v)).filter((v) => v) : []) } : {}) }}" + } + }, + "postRequestScript": "zoneFirewallEventVolume.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "ui": [ + { + "type": "autocomplete", + "name": "actions", + "label": "Action(s)", + "isMulti": true, + "isClearable": true, + "data": { + "source": "fixed", + "values": [ + { + "value": "block", + "label": "Block" + }, + { + "value": "managed_challenge", + "label": "Managed Challenge" + }, + { + "value": "challenge", + "label": "Interactive Challenge" + }, + { + "value": "jschallenge", + "label": "JS Challenge" + }, + { + "value": "connection_close", + "label": "Connection Close" + }, + { + "value": "log", + "label": "Log" + }, + { + "value": "skip", + "label": "Skip" + }, + { + "value": "bypass", + "label": "Bypass" + }, + { + "value": "allow", + "label": "Allow" + } + ] + } + }, + { + "type": "autocomplete", + "name": "sources", + "label": "Service(s)", + "isMulti": true, + "isClearable": true, + "data": { + "source": "fixed", + "values": [ + { + "value": "firewallManaged", + "label": "Managed Rules" + }, + { + "value": "firewallCustom", + "label": "Custom Rules" + }, + { + "value": "rateLimit", + "label": "Rate Limiting Rules" + }, + { + "value": "l7ddos", + "label": "HTTP DDoS Protection" + }, + { + "value": "botFight", + "label": "Bot Fight Mode" + }, + { + "value": "botManagement", + "label": "Bot Management" + }, + { + "value": "bic", + "label": "Browser Integrity Check" + }, + { + "value": "securityLevel", + "label": "Security Level" + }, + { + "value": "ip", + "label": "IP Access Rules" + }, + { + "value": "ipRange", + "label": "IP Range Access Rules" + }, + { + "value": "asn", + "label": "ASN Access Rules" + }, + { + "value": "country", + "label": "Country Access Rules" + }, + { + "value": "uaBlock", + "label": "User Agent Blocking" + }, + { + "value": "zoneLockdown", + "label": "Zone Lockdown" + }, + { + "value": "hot", + "label": "Hotlink Protection" + }, + { + "value": "validation", + "label": "Request Validation" + }, + { + "value": "apiShield", + "label": "API Shield" + }, + { + "value": "dlp", + "label": "Data Loss Prevention" + } + ] + } + } + ], + "metadata": [ + { + "name": "datetime", + "displayName": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + }, + { + "name": "zoneName", + "displayName": "Zone", + "shape": "string", + "sourceId": "zoneTag", + "sourceType": "Cloudflare Zone", + "role": "label" + }, + { + "name": "zoneTag", + "displayName": "Zone Tag", + "shape": "string", + "visible": false + } + ], + "timeframes": [ + "last1hour", + "last12hours", + "last24hours", + "last7days", + "last30days" + ] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneFirewallEvents.json b/plugins/Cloudflare/v2/dataStreams/zoneFirewallEvents.json new file mode 100644 index 00000000..fd084dc9 --- /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": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "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", "connection_close"], + "warning": ["challenge", "managed_challenge", "jschallenge"], + "success": ["allow", "skip", "log", "bypass"] + } + } + ] + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days", "last30days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json b/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json new file mode 100644 index 00000000..c4ed925a --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneHealthCheckEvents.json @@ -0,0 +1,86 @@ +{ + "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:[count_DESC]){count avg{rttMs}dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} healthCheckName healthCheckId healthStatus healthChanged failureReason region originIP}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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..e41ce5b3 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneLoadBalancing.json @@ -0,0 +1,58 @@ +{ + "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": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlRows.js", + "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": ["last1hour", "last12hours", "last24hours"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneNelReports.json b/plugins/Cloudflare/v2/dataStreams/zoneNelReports.json new file mode 100644 index 00000000..f868cbe6 --- /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:[count_DESC]){events: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zonePageShield.json b/plugins/Cloudflare/v2/dataStreams/zonePageShield.json new file mode 100644 index 00000000..8f01634d --- /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:[count_DESC]){events: count dimensions{date: {{ (timeframe.unixEnd - timeframe.unixStart) <= 5400 ? 'datetimeFiveMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 46800 ? 'datetimeFifteenMinutes' : (timeframe.unixEnd - timeframe.unixStart) <= 90000 ? 'datetimeHour' : 'date' }} {{breakdown}}}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "Time", + "shape": "date", + "role": "timestamp" + }, + { + "name": "breakdown", + "displayName": "Breakdown", + "shape": "string", + "role": "label" + }, + { + "name": "events", + "displayName": "Events", + "shape": "number", + "role": "value" + } + ], + "timeframes": ["last1hour", "last12hours", "last24hours", "last7days"] +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneStatus.json b/plugins/Cloudflare/v2/dataStreams/zoneStatus.json new file mode 100644 index 00000000..17e0a2b7 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneStatus.json @@ -0,0 +1,55 @@ +{ + "name": "zoneStatus", + "displayName": "Zone Status", + "description": "Current status of a zone as a health state (paused zones show as warning)", + "tags": ["Zone", "Availability"], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "get", + "endpointPath": "zones/{{object.rawId}}", + "pathToData": "result", + "expandInnerObjects": true, + "paging": { "mode": "none" }, + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { "type": "oneOf", "values": ["Cloudflare Zone"] } + }, + "metadata": [ + { "name": "id", "displayName": "Zone ID", "shape": "string", "visible": false }, + { + "name": "name", + "displayName": "Zone", + "shape": "string", + "role": "label", + "sourceId": "id", + "sourceType": "Cloudflare Zone" + }, + { "name": "status", "displayName": "Cloudflare Status", "shape": "string", "visible": false }, + { "name": "paused", "displayName": "Paused", "shape": "boolean" }, + { + "name": "state", + "displayName": "Status", + "computed": true, + "valueExpression": "{{ $['paused'] === true || $['paused'] === 'true' ? 'paused' : $['status'] }}", + "shape": [ + "state", + { + "map": { + "success": ["active"], + "warning": ["pending", "initializing", "read only", "paused"], + "error": ["moved", "deactivated", "deleted"] + } + } + ] + }, + { "name": "plan.name", "displayName": "Plan", "shape": "string" }, + { "name": "type", "displayName": "Zone Type", "shape": "string" }, + { "name": "modified_on", "displayName": "Last Modified", "shape": "date" } + ], + "timeframes": false +} diff --git a/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json b/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json new file mode 100644 index 00000000..df15f906 --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneTraffic.json @@ -0,0 +1,118 @@ +{ + "name": "zoneTraffic", + "displayName": "Zone Traffic", + "description": "HTTP request, cache and bandwidth totals for a zone (hourly up to 2 days, daily beyond)", + "tags": [ + "Zone", + "Analytics" + ], + "baseDataSourceName": "httpRequestScopedSingle", + "config": { + "httpMethod": "post", + "endpointPath": "graphql", + "postBody": { + "query": "query($zoneTag:string!,$start:{{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'Time!' : 'Date!' }},$end:{{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'Time!' : 'Date!' }}){viewer{zones(filter:{zoneTag:$zoneTag}){rows: {{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'httpRequests1hGroups' : 'httpRequests1dGroups' }}(limit:10000,filter:{ {{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'datetime' : 'date' }}_geq:$start, {{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'datetime' : 'date' }}_leq:$end},orderBy:[{{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'datetime' : 'date' }}_ASC]){dimensions{datetime: {{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? 'datetime' : 'date' }}}sum{requests cachedRequests bytes cachedBytes threats pageViews encryptedRequests}uniq{uniques}}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? timeframe.start : timeframe.start.split('T')[0] }}", + "end": "{{ (timeframe.unixEnd - timeframe.unixStart) <= 172800 ? timeframe.end : new Date((timeframe.unixEnd - 1) * 1000).toISOString().split('T')[0] }}" + } + }, + "postRequestScript": "zoneTraffic.js", + "errorHandling": { + "type": "path", + "realm": "payload", + "path": "errors.0.message" + } + }, + "matches": { + "sourceType": { + "type": "oneOf", + "values": [ + "Cloudflare Zone" + ] + } + }, + "metadata": [ + { + "name": "zoneTag", + "displayName": "Zone Tag", + "shape": "string", + "role": "id", + "visible": false + }, + { + "name": "zoneName", + "displayName": "Zone", + "shape": "string", + "role": "label", + "sourceId": "zoneTag", + "sourceType": "Cloudflare Zone" + }, + { + "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", + "last7days", + "last30days", + "thisMonth", + "lastMonth", + "thisQuarter", + "lastQuarter", + "thisYear" + ] +} \ 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..ec239ccc --- /dev/null +++ b/plugins/Cloudflare/v2/dataStreams/zoneTrafficBreakdown.json @@ -0,0 +1,73 @@ +{ + "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]){requests: count sum{bytes: edgeResponseBytes visits} dimensions{ {{breakdown}} }}}}}", + "variables": { + "zoneTag": "{{object.rawId}}", + "start": "{{ new Date((timeframe.unixStart + 60) * 1000).toISOString() }}", + "end": "{{timeframe.end}}" + } + }, + "postRequestScript": "graphqlFlatRows.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": "clientSSLProtocol", "label": "SSL Protocol" }, + { "value": "requestSource", "label": "Request Source" }, + { "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": ["last1hour", "last12hours", "last24hours", "last7days", "last30days"] +} 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/Account/account.dash.json b/plugins/Cloudflare/v2/defaultContent/Account/account.dash.json new file mode 100644 index 00000000..a68eb506 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Account/account.dash.json @@ -0,0 +1,766 @@ +{ + "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": "36f99add-606b-4848-8e56-7dfdf94c824b", + "x": 0, + "y": 5, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Zone", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "zoneTag" + }, + "sort": { + "by": [ + [ + "datetime", + "asc" + ] + ] + } + }, + "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": "datetime", + "yAxisColumn": [ + "requests" + ], + "seriesColumn": "zoneName", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + }, + "timeframe": "last24hours" + } + }, + { + "i": "2789dab8-bd9d-4cf9-b5d4-9e1ed480084f", + "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.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientCountryName" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "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": "horizontal", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + }, + "timeframe": "last24hours" + } + }, + { + "i": "8eb403cb-7ab9-46b2-84df-2aa0ed1c22ca", + "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.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "edgeResponseStatus" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "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": "horizontal", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + }, + "timeframe": "last24hours" + } + }, + { + "i": "a38a89d8-b533-4bef-bbbb-3bfefb3f44ba", + "x": 0, + "y": 11, + "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": "463aafc7-e7fe-483a-9415-135d591794ab", + "x": 1, + "y": 11, + "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": 0, + "y": 14, + "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" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Account/accountDeveloperPlatform.dash.json b/plugins/Cloudflare/v2/defaultContent/Account/accountDeveloperPlatform.dash.json new file mode 100644 index 00000000..b6ab010c --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Account/accountDeveloperPlatform.dash.json @@ -0,0 +1,1063 @@ +{ + "name": "Account Developer Platform", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "0e7ae631-b894-4f67-a73a-b9e61ce540f9", + "x": 0, + "y": 0, + "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": 1, + "y": 0, + "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": "b6731e3d-91a3-4ead-9685-7df79e235ce0", + "x": 2, + "y": 0, + "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": "885088db-eba0-4a67-a170-c12c84b61c3c", + "x": 3, + "y": 0, + "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": 0, + "y": 2, + "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": "6ebe2742-9444-4be7-9edc-1c5b1e113633", + "x": 1, + "y": 2, + "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": 5, + "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": 5, + "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": "a43ecf79-6372-4f65-bec5-d9e8c925d643", + "x": 0, + "y": 8, + "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": 8, + "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": "ed67a1f0-321c-48e0-98da-937932cbe709", + "x": 0, + "y": 11, + "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": 11, + "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": "18fdde70-9cd8-4d1b-8b5c-0b06ccd397cd", + "x": 0, + "y": 14, + "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": 14, + "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": "a92b1e43-9903-4d5d-9941-6dd4c1e7f726", + "x": 0, + "y": 17, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Build Minutes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerBuildMinutes]}}", + "name": "workerBuildMinutes", + "pluginConfigId": "{{configId}}", + "group": { + "by": [ + [ + "dimensions.datetime", + "byDay" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.buildMinutes" + ] + } + ] + } + }, + "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.buildMinutes_sum" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + }, + "timeframe": "last30days" + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Account/accountResources.dash.json b/plugins/Cloudflare/v2/defaultContent/Account/accountResources.dash.json new file mode 100644 index 00000000..79a39495 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Account/accountResources.dash.json @@ -0,0 +1,673 @@ +{ + "name": "Account Resources", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "5c67e20d-99f0-4dab-b8c6-13a5f0fdf92b", + "x": 0, + "y": 0, + "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": 0, + "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": 4, + "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": 4, + "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": 8, + "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": 8, + "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", + "primaryProducerScript", + "primaryConsumerScript", + "producers", + "consumers", + "modifiedOn" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "createdOn", + "producerScripts", + "consumerScripts", + "primaryProducerSourceId", + "primaryConsumerSourceId" + ] + } + } + } + } + }, + { + "i": "83f57d60-3e02-40dd-8ab5-9ca6bed4fea9", + "x": 0, + "y": 12, + "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": 12, + "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": 16, + "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": "cd0f4644-c131-45c5-aef2-0ec8d91ca62e", + "x": 2, + "y": 16, + "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": 0, + "y": 20, + "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" + ] + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Account/accountZeroTrust.dash.json b/plugins/Cloudflare/v2/defaultContent/Account/accountZeroTrust.dash.json new file mode 100644 index 00000000..b0f0fd73 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Account/accountZeroTrust.dash.json @@ -0,0 +1,798 @@ +{ + "name": "Account Zero Trust", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [ + "{{variables.[Cloudflare Account]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "d7931877-849c-421d-88e5-c5a83d107ce4", + "x": 0, + "y": 0, + "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": 0, + "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": "ac748a4a-ca7b-4b10-a2c0-50936b00e9d7", + "x": 2, + "y": 0, + "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": "2edd6feb-b28c-455a-bb9b-8abdbbf04638", + "x": 0, + "y": 2, + "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": 2, + "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": "cb3540f5-b6f5-4596-9555-b9ee9a2b8792", + "x": 0, + "y": 5, + "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": "daad39ca-4ae3-437e-a2a4-657f660e6045", + "x": 2, + "y": 5, + "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": 0, + "y": 8, + "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": "ae5e51c8-183b-4518-958e-422eafc1779e", + "x": 2, + "y": 8, + "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": "36b11ab5-9da0-456f-8056-cfb27f386542", + "x": 0, + "y": 11, + "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": 11, + "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/Account/manifest.json b/plugins/Cloudflare/v2/defaultContent/Account/manifest.json new file mode 100644 index 00000000..935dfd77 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Account/manifest.json @@ -0,0 +1,20 @@ +{ + "items": [ + { + "name": "account", + "type": "dashboard" + }, + { + "name": "accountResources", + "type": "dashboard" + }, + { + "name": "accountZeroTrust", + "type": "dashboard" + }, + { + "name": "accountDeveloperPlatform", + "type": "dashboard" + } + ] +} 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..869e46a5 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/durableObjectNamespace.dash.json @@ -0,0 +1,869 @@ +{ + "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 + } + } + } + } + }, + { + "i": "6040902c-b829-4c63-8dd5-b1247233ae98", + "x": 0, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Active and CPU Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectActivity]}}", + "name": "durableObjectActivity", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "activeTimeMs", + "cpuTimeMs" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "a43d0eed-2080-45aa-8290-23f0242cbea2", + "x": 2, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Peak Memory", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectActivity]}}", + "name": "durableObjectActivity", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "max.memoryUsageBytes" + ], + "seriesColumn": "none", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "fb5f350c-d155-46e7-89d4-143ae7d9e770", + "x": 0, + "y": 17, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Storage Operations", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectActivity]}}", + "name": "durableObjectActivity", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "sum.rowsRead", + "sum.rowsWritten" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "f08d883b-6f7b-497e-8c3a-c83ac356f278", + "x": 2, + "y": 17, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Limit and Internal Errors", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[durableObjectActivity]}}", + "name": "durableObjectActivity", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "sum.exceededCpuErrors", + "sum.exceededMemoryErrors", + "sum.fatalInternalErrors" + ], + "seriesColumn": "none", + "showLegend": true, + "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..7e7220f0 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/queue.dash.json @@ -0,0 +1,675 @@ +{ + "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 + } + } + } + } + }, + { + "i": "a86dfd13-0577-4b29-8335-fff93d5e007a", + "x": 0, + "y": 14, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Delayed Messages", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[queueDelayedBacklog]}}", + "name": "queueDelayedBacklog", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "avg.messages" + ], + "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..7a7a4170 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Compute/worker.dash.json @@ -0,0 +1,881 @@ +{ + "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" + } + } + } + } + }, + { + "i": "4fb0038e-6c55-4a4a-bcbc-382dd2d96f4d", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Subrequests by Host", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerSubrequests]}}", + "name": "workerSubrequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "hostname" + }, + "group": { + "by": [ + [ + "breakdown", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "sum.subrequests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "sum.subrequests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Workers]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Worker]}}" + }, + "variables": [ + "{{variables.[Cloudflare Worker]}}" + ], + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "breakdown_uniqueValues", + "yAxisData": [ + "sum.subrequests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "horizontal", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "58470c3e-ba46-4207-8867-298f50da1905", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Subrequest Response Time", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerSubrequests]}}", + "name": "workerSubrequests", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "hostname" + }, + "group": { + "by": [ + [ + "dimensions.datetime", + "byHour" + ] + ], + "aggregate": [ + { + "type": "mean", + "names": [ + "responseTimeP50" + ] + }, + { + "type": "mean", + "names": [ + "responseTimeP99" + ] + } + ] + } + }, + "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": [ + "responseTimeP50_mean", + "responseTimeP99_mean" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "c3e01082-afaa-4e6d-95af-3e3170e41715", + "x": 0, + "y": 11, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cron Trigger Runs", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerCronRuns]}}", + "name": "workerCronRuns", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "datetime", + "desc" + ] + ] + } + }, + "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": false, + "columnOrder": [ + "datetime", + "cron", + "statusState", + "cpuTime", + "scheduledDatetime" + ], + "hiddenColumns": [ + "status", + "cpuTimeUs" + ] + } + } + }, + "timeframe": "last7days" + } + }, + { + "i": "e2827126-91cf-4d52-b66e-7a753b1c633e", + "x": 0, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Static Asset Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerStaticAssets]}}", + "name": "workerStaticAssets", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "statusCode" + }, + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "sum.requests" + ], + "seriesColumn": "breakdown", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "55e8a7cf-6c81-4a32-925c-5f9717439bcc", + "x": 2, + "y": 14, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Cache API Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerCacheRequests]}}", + "name": "workerCacheRequests", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "sum.requests" + ], + "seriesColumn": "dimensions.cacheStatus", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "64b62cb5-f7e9-406e-afb3-ef551c6b3ee4", + "x": 0, + "y": 17, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Smart Placement Duration (P50)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerSmartPlacement]}}", + "name": "workerSmartPlacement", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "quantiles.requestDurationP50" + ], + "seriesColumn": "dimensions.placementUsed", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} 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..f6d6c1ec --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/hyperdriveConfig.dash.json @@ -0,0 +1,525 @@ +{ + "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 + } + } + } + } + }, + { + "i": "d5484d9b-0e56-4e3b-8ca0-b73c5047827f", + "x": 0, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Connection Pool", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdrivePoolSizes]}}", + "name": "hyperdrivePoolSizes", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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.datetime", + "yAxisColumn": [ + "avg.currentPoolSize", + "avg.availablePoolSlots" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "c6bc4792-922b-4a02-a027-c5278bc00974", + "x": 2, + "y": 8, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Waiting Clients", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[hyperdrivePoolSizes]}}", + "name": "hyperdrivePoolSizes", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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.datetime", + "yAxisColumn": [ + "avg.waitingClients", + "max.waitingClients" + ], + "seriesColumn": "none", + "showLegend": true, + "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..407b80cb --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Storage & Databases/r2Bucket.dash.json @@ -0,0 +1,620 @@ +{ + "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 + } + } + } + } + }, + { + "i": "ffdfeca3-954a-4f79-abbd-c89731c8d078", + "x": 0, + "y": 11, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bandwidth", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[r2Bandwidth]}}", + "name": "r2Bandwidth", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.datetime", + "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", + "yAxisColumn": [ + "sum.bytesDownload", + "sum.bytesUpload" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + } + ] + } +} 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..cacf907e --- /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 Centers", + "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 Centers" + } + } + } + } + }, + { + "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 Center", + "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/Zones/loadBalancerPool.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/loadBalancerPool.dash.json new file mode 100644 index 00000000..6a39de34 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/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 Center", + "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/Zones/manifest.json b/plugins/Cloudflare/v2/defaultContent/Zones/manifest.json new file mode 100644 index 00000000..ded2fbf2 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/manifest.json @@ -0,0 +1,28 @@ +{ + "items": [ + { + "name": "zone", + "type": "dashboard" + }, + { + "name": "zoneTraffic", + "type": "dashboard" + }, + { + "name": "zoneWebPerformance", + "type": "dashboard" + }, + { + "name": "zoneSecurity", + "type": "dashboard" + }, + { + "name": "zoneDnsEmail", + "type": "dashboard" + }, + { + "name": "loadBalancerPool", + "type": "dashboard" + } + ] +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zones/zone.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/zone.dash.json new file mode 100644 index 00000000..e991ea9b --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/zone.dash.json @@ -0,0 +1,763 @@ +{ + "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": "086887f6-cec2-47b8-bf3e-1f2b8d8f5eb5", + "x": 0, + "y": 2, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zone Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneStatus]}}", + "name": "zoneStatus", + "pluginConfigId": "{{configId}}" + }, + "timeframe": "none", + "visualisation": { + "type": "data-stream-blocks", + "config": { + "data-stream-blocks": { + "labelColumn": "name", + "stateColumn": "state", + "sublabel": "plan.name", + "linkColumn": "name", + "columns": 1 + } + } + }, + "monitor": { + "_type": "simple", + "tileRollsUp": true, + "monitorType": "state", + "column": "state", + "aggregation": "top", + "condition": { + "columns": [ + "state" + ] + }, + "frequency": 15 + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ] + } + }, + { + "i": "a73efcb0-71d7-4148-91c5-56edd3518568", + "x": 2, + "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": 0, + "y": 5, + "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": 2, + "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": 0, + "y": 8, + "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": "6084f30d-d547-4fdf-8712-6ac71b5fb03a", + "x": 2, + "y": 8, + "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": 0, + "y": 11, + "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": "d1d83606-df02-4ee0-88ad-4b88401340ad", + "x": 2, + "y": 12, + "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": 0, + "y": 15, + "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 + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zones/zoneDnsEmail.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/zoneDnsEmail.dash.json new file mode 100644 index 00000000..463aa91b --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/zoneDnsEmail.dash.json @@ -0,0 +1,693 @@ +{ + "name": "Zone DNS & Email", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "bb2d2cdd-d041-435a-b77f-47ef0f8190b8", + "x": 0, + "y": 0, + "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": 0, + "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": "bba8874b-de16-4088-ba86-f7a3f1242e6e", + "x": 0, + "y": 3, + "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": 3, + "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": "2a5caeac-bbae-4322-934c-4a58f34091f0", + "x": 0, + "y": 6, + "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": "e7ec1705-838a-4d37-918b-496b4da2e138", + "x": 0, + "y": 10, + "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": "5a35c781-2682-4880-bff7-77c61d52ae5f", + "x": 2, + "y": 10, + "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": "404f3e25-56a7-4f0d-b112-e9c12846d0bb", + "x": 0, + "y": 13, + "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": 13, + "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" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zones/zoneSecurity.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/zoneSecurity.dash.json new file mode 100644 index 00000000..f50b4cb6 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/zoneSecurity.dash.json @@ -0,0 +1,523 @@ +{ + "name": "Zone Security", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "414ccb22-cce5-4121-ba54-ba0c4ae80aa8", + "x": 0, + "y": 0, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Events (Last 30 Days)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEventVolume]}}", + "name": "zoneFirewallEventVolume", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "datetime", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "timeframe": "last30days", + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "datetime", + "yAxisColumn": [ + "events" + ], + "seriesColumn": "zoneName", + "showLegend": false, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "36980a5b-9966-4da8-b4ae-03a64c40c648", + "x": 0, + "y": 3, + "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": "f70d4a4d-aa25-436e-bc2d-f57913923742", + "x": 2, + "y": 3, + "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": "b5b428c0-6e8b-4b20-8637-826523d8875e", + "x": 0, + "y": 6, + "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": "ab07298c-beb2-45ad-ab55-973b5ee13c9e", + "x": 2, + "y": 6, + "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": "bb0a1d4a-34c2-4cf2-be6d-196aa666ecd3", + "x": 0, + "y": 9, + "w": 4, + "h": 5, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Firewall Event Log", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneFirewallEventLog]}}", + "name": "zoneFirewallEventLog", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "datetime", + "desc" + ] + ] + } + }, + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "datetime", + "actionState", + "action", + "source", + "description", + "clientIP", + "clientCountryName", + "clientRequestHTTPHost", + "clientRequestPath", + "rayName" + ], + "hiddenColumns": [ + "ruleId", + "clientASNDescription", + "clientRequestHTTPMethodName", + "userAgent", + "edgeResponseStatus" + ] + } + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}", + "variable": "{{variables.[Cloudflare Zone]}}" + }, + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ] + } + }, + { + "i": "60c857c2-28a9-47cf-b0aa-85676a291c9f", + "x": 0, + "y": 14, + "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/Zones/zoneTraffic.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/zoneTraffic.dash.json new file mode 100644 index 00000000..9aa87338 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/zoneTraffic.dash.json @@ -0,0 +1,756 @@ +{ + "name": "Zone Traffic", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "8a7c2e43-e5a1-4fb8-a862-3bf8ec9f364d", + "x": 0, + "y": 0, + "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": 0, + "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": 3, + "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": 3, + "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": "710d825b-71be-494f-bc23-867b6435d5c3", + "x": 0, + "y": 6, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic by SSL Protocol", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "clientSSLProtocol" + }, + "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": "89d0acb0-7a75-4c20-a4be-f671917579e4", + "x": 2, + "y": 6, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Traffic by Request Source", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneTrafficBreakdown]}}", + "name": "zoneTrafficBreakdown", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "requestSource" + }, + "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": "4340f0d4-7cb2-495e-a086-4b115ac7eede", + "x": 0, + "y": 9, + "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": 9, + "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": "d2d06e16-5181-4c42-9faf-f5eb6986072f", + "x": 0, + "y": 12, + "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": 12, + "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": "0b37e21b-6c6a-4442-8a58-507f77fb6451", + "x": 0, + "y": 15, + "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" + } + } + } + } + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/Zones/zoneWebPerformance.dash.json b/plugins/Cloudflare/v2/defaultContent/Zones/zoneWebPerformance.dash.json new file mode 100644 index 00000000..39374958 --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/Zones/zoneWebPerformance.dash.json @@ -0,0 +1,681 @@ +{ + "name": "Zone Web Performance", + "schemaVersion": "1.5", + "timeframe": "last24hours", + "variables": [ + "{{variables.[Cloudflare Zone]}}" + ], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "99e46b39-b7fd-4d39-8990-7bfec62f4a92", + "x": 0, + "y": 0, + "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": 0, + "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": 0, + "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": 0, + "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": 2, + "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": 2, + "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": "736448a6-7b52-440a-b866-f2f4b23ab048", + "x": 0, + "y": 5, + "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": "3fa5456b-67bc-4f54-b2f7-9f20cad1aa50", + "x": 0, + "y": 8, + "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": 8, + "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": "7777d765-1ec1-470d-8e6a-6c70e15637a9", + "x": 0, + "y": 11, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Page Load Timing (P75)", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[rumPageLoadTiming]}}", + "name": "rumPageLoadTiming", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "dimensions.date", + "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.date", + "yAxisColumn": [ + "dnsTime", + "connectionTime", + "requestTime", + "responseTime", + "firstContentfulPaint", + "pageLoadTime" + ], + "seriesColumn": "none", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + }, + "timeframe": "last7days" + } + } + ] + } +} diff --git a/plugins/Cloudflare/v2/defaultContent/inventory.dash.json b/plugins/Cloudflare/v2/defaultContent/inventory.dash.json new file mode 100644 index 00000000..b54bc63f --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/inventory.dash.json @@ -0,0 +1,1152 @@ +{ + "name": "Inventory", + "schemaVersion": "1.5", + "timeframe": "none", + "variables": [], + "dashboard": { + "_type": "layout/grid", + "columns": 4, + "version": 1, + "contents": [ + { + "i": "2bbc6141-d374-41c7-93b1-3b3f7677c193", + "x": 0, + "y": 0, + "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": 4, + "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": 4, + "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": 7, + "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": 7, + "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": 10, + "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": 10, + "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": 13, + "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": 13, + "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": 16, + "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": 19, + "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": 19, + "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": 22, + "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": 22, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Worker Routes", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[workerRoutes]}}", + "name": "workerRoutes", + "pluginConfigId": "{{configId}}", + "sort": { + "by": [ + [ + "pattern", + "asc" + ] + ] + } + }, + "timeframe": "none", + "scope": { + "scope": "{{scopes.[Cloudflare Zones]}}", + "workspace": "{{workspaceId}}" + }, + "visualisation": { + "type": "data-stream-table", + "config": { + "data-stream-table": { + "transpose": false, + "columnOrder": [ + "pattern", + "scriptName", + "zoneName" + ], + "hiddenColumns": [ + "sourceId", + "accountId", + "zoneId", + "workerSourceId" + ] + } + } + } + } + }, + { + "i": "2115654f-a854-4c27-8231-e3d8dc3cd77c", + "x": 0, + "y": 25, + "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": 28, + "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": 28, + "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": 31, + "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": 31, + "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": 34, + "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": 34, + "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": 37, + "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/manifest.json b/plugins/Cloudflare/v2/defaultContent/manifest.json new file mode 100644 index 00000000..3de7431e --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/manifest.json @@ -0,0 +1,40 @@ +{ + "items": [ + { + "name": "overview", + "type": "dashboard" + }, + { + "name": "inventory", + "type": "dashboard" + }, + { + "name": "Account", + "type": "folder" + }, + { + "name": "Zones", + "type": "folder" + }, + { + "name": "Compute", + "type": "folder" + }, + { + "name": "Storage & Databases", + "type": "folder" + }, + { + "name": "AI", + "type": "folder" + }, + { + "name": "Zero Trust", + "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..5d44c65f --- /dev/null +++ b/plugins/Cloudflare/v2/defaultContent/overview.dash.json @@ -0,0 +1,1076 @@ +{ + "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": "6b70dcfc-f6fe-4f22-a57c-7fa7fa23be9c", + "x": 0, + "y": 10, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Zone Status", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[zoneStatus]}}", + "name": "zoneStatus", + "pluginConfigId": "{{configId}}", + "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": "state", + "sublabel": "plan.name", + "linkColumn": "name", + "columns": 4 + } + } + }, + "monitor": { + "_type": "simple", + "tileRollsUp": true, + "monitorType": "state", + "column": "state", + "aggregation": "top", + "condition": { + "columns": [ + "state" + ] + }, + "frequency": 15 + } + } + }, + { + "i": "ed93f0f7-9697-4096-b385-03cfcca256e8", + "x": 0, + "y": 13, + "w": 4, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Requests by Zone", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "zoneTag" + }, + "sort": { + "by": [ + [ + "datetime", + "asc" + ] + ] + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "last24hours", + "visualisation": { + "type": "data-stream-line-graph", + "config": { + "data-stream-line-graph": { + "xAxisColumn": "datetime", + "yAxisColumn": [ + "requests" + ], + "seriesColumn": "zoneName", + "showLegend": true, + "legendPosition": "bottom", + "showYAxisLabel": false, + "showTrendLine": false + } + } + } + } + }, + { + "i": "f577bcf2-adb3-4fe5-b017-ecc1afe3c320", + "x": 0, + "y": 16, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Top Zones by Requests", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "zoneTag" + }, + "group": { + "by": [ + [ + "zoneName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "requests" + ] + } + ] + }, + "sort": { + "by": [ + [ + "requests_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "last24hours", + "visualisation": { + "type": "data-stream-bar-chart", + "config": { + "data-stream-bar-chart": { + "xAxisData": "zoneName_uniqueValues", + "yAxisData": [ + "requests_sum" + ], + "xAxisGroup": "none", + "xAxisLabel": "", + "yAxisLabel": "", + "showXAxisLabel": false, + "showYAxisLabel": false, + "showLegend": false, + "legendPosition": "bottom", + "showGrid": true, + "horizontalLayout": "horizontal", + "displayMode": "actual", + "showTotals": false, + "showValue": false, + "grouping": false, + "range": { + "type": "auto" + } + } + } + } + } + }, + { + "i": "468ed54a-6c84-4380-907b-8fce6d718637", + "x": 2, + "y": 16, + "w": 2, + "h": 3, + "moved": false, + "static": false, + "z": 0, + "config": { + "_type": "tile/data-stream", + "title": "Bandwidth by Zone", + "description": "", + "activePluginConfigIds": [ + "{{configId}}" + ], + "dataStream": { + "id": "{{dataStreams.[accountTraffic]}}", + "name": "accountTraffic", + "pluginConfigId": "{{configId}}", + "dataSourceConfig": { + "breakdown": "zoneTag" + }, + "group": { + "by": [ + [ + "zoneName", + "uniqueValues" + ] + ], + "aggregate": [ + { + "type": "sum", + "names": [ + "bytes" + ] + } + ] + }, + "sort": { + "by": [ + [ + "bytes_sum", + "desc" + ] + ], + "top": 10 + } + }, + "scope": { + "scope": "{{scopes.[Cloudflare Accounts]}}", + "workspace": "{{workspaceId}}" + }, + "timeframe": "last24hours", + "visualisation": { + "type": "data-stream-donut-chart", + "config": { + "data-stream-donut-chart": { + "valueColumn": "bytes_sum", + "labelColumn": "zoneName_uniqueValues", + "hideCenterValue": false, + "showValuesAsPercentage": false, + "legendPosition": "auto", + "legendMode": "table" + } + } + } + } + }, + { + "i": "01071810-2460-4d6f-ac37-2d8c6c78ace3", + "x": 0, + "y": 19, + "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": 19, + "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" + } + } + } + } + } + ] + } +} 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..de96c9e8 --- /dev/null +++ b/plugins/Cloudflare/v2/docs/README.md @@ -0,0 +1,278 @@ +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/). + +## 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 runs three checks: + +1. **Authenticate** verifies the token against Cloudflare's token-verification endpoint. This check must pass; a failure means the token is invalid, expired or revoked. +2. **Check account access** lists the accounts the token can see, and warns if there are none - usually a missing **Account Settings Read** permission or account resources that do not include the account. +3. **Check zone access** does the same for zones, and warns if there are none - usually a missing **Zone Read** permission or zone resources that do not include the zone. + +The second and third checks warn without blocking the save. None of the checks tests individual product 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 for each zone (hourly for the last two days, daily up to a year) or across every zone in an account, plus breakdowns by country, status code, cache status, host, device type, HTTP protocol, SSL protocol, request source and content type. +- **Security** - firewall and WAF events by rule, service, country, host, user agent or path, with the action Cloudflare took; 30-day event trends and a log of individual events on every plan; and SSL certificate inventory with days until expiry. +- **DNS and availability** - each zone's status as a health state; 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 and timing (DNS, connection, response, first contentful paint, page load) from Cloudflare Web Analytics, per zone. +- **Developer platform** - Worker invocations, errors and CPU-time percentiles, outbound subrequests and response time, cron trigger runs, static asset and Cache API requests, Smart Placement and build minutes; R2 bucket operations, bandwidth and stored size; KV operations, latency and stored keys; D1 query counts, rows touched and database size; Queue message operations and backlog, including delayed messages; Durable Object invocations, active and CPU time, errors, memory and storage; Vectorize query volume; Hyperdrive query volume and connection pool; 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 an **Overview** of every account and zone and an **Inventory** of every imported resource. Perspectives are grouped into folders: **Account** (Account, Account Resources, Account Zero Trust and Account Developer Platform), **Zones** (Zone, Zone Traffic, Zone Web Performance, Zone Security, Zone DNS & Email and Load Balancer Pool), Compute, Storage & Databases, AI, Zero Trust and Media. Worker Routes and Worker Bindings are indexed and drive the relationship graph but have no perspective of their own. + +## Data streams + +- **Zone Traffic** - requests, bandwidth, cached traffic, threats, page views and cache hit ratio for a zone, hourly for timeframes up to two days and daily beyond. +- **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, SSL protocol, request source or content type). SSL protocol `none` is unencrypted HTTP; request source separates visitor traffic (`eyeball`) from requests made by Workers. +- **Zone Firewall Events** - firewall and WAF event counts for a zone by action, grouped by rule, service, country, host, user agent or path. +- **Zone Firewall Event Volume** - firewall and WAF event counts over time for a zone, optionally filtered by action and service, for up to 30 days on every plan. +- **Zone Firewall Event Log** - individual firewall and WAF events for a zone, newest first, with the action, service, rule, client IP, country, host, path, user agent and Ray ID, optionally filtered by action and service. Returns the latest 1,000 events in the timeframe, for up to 30 days on every plan. +- **Zone Status** - a zone's status as a health state: active is healthy; pending, initializing, read-only and paused zones are warnings; moved and deactivated zones are errors. +- **Account Traffic** - requests, bandwidth and visits across every zone in an account in one query, grouped by zone, country, status code, cache status, host or device type. +- **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. +- **Worker Subrequests** - outbound requests a Worker makes, with bytes and P50/P99 response time, grouped by host, cache status, status code or outcome. +- **Worker Cron Trigger Runs** - each scheduled run of a Worker with its schedule, outcome and CPU time, so a failing cron trigger is visible. +- **Worker Static Asset Requests** - requests served from a Worker's static assets, by status code, cache status or host. +- **Worker Cache Requests** - Cache API requests a Worker makes, by cache status. +- **Worker Smart Placement** - requests and duration for a Worker, split by whether Smart Placement ran it near its back end. +- **Worker Build Minutes** - Workers Builds minutes used by an account. +- **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. +- **R2 Bandwidth** - bytes downloaded from and uploaded to an R2 bucket. +- **KV Operations** - request counts and latency percentiles for a KV namespace by operation type. +- **KV Storage** - stored key count and byte size for a KV namespace. +- **D1 Queries** - read and write query counts, rows read and written, response bytes and query-time percentiles for a D1 database. +- **D1 Storage** - 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. +- **Queue Delayed Backlog** - average delayed messages waiting in a queue. +- **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** - 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, SPF result or DMARC result. +- **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. +- **Web Analytics Page Load Timing** - P75 DNS, connection, request, response, first contentful paint and page load times 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. +- **Hyperdrive Connection Pool** - pool size, free slots and waiting clients for a Hyperdrive configuration. +- **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** - 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. +- **Durable Object Activity** - active time, CPU time, storage operations, limit errors, peak memory and WebSocket connections 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 runs a query you write and shapes the result like any other stream. Its default query shows hourly traffic for the selected zone; edit it from there. + +- **Zone or account** fills in the IDs a query needs. Select a zone and the query can use `$zoneTag`, `$zoneTags` (every selected zone, for `zoneTag_in`) and `$accountTag` (the zone's account); select an account and it can use `$accountTag`. On a zone or account perspective, bind the dashboard variable here and one tile works for every zone. +- The timeframe arrives as `$start` and `$end` (`Time!`, ISO 8601) and `$startDate` and `$endDate` (`Date!`, `YYYY-MM-DD`), so a query can filter with `datetime_geq: $start` or `date_geq: $startDate`. Declare only the variables the query uses. +- **Variables** adds your own as a JSON object, and overrides a built-in variable of the same name. +- **Path to rows** can usually stay empty: the stream uses the first array of rows in the response. Set it, for example to `data.viewer.zones.0.httpRequests1hGroups`, when a query reads several datasets or zones. A wrong path is reported with the array paths the response does contain. +- Nested fields become dotted columns, such as `sum.requests` and `dimensions.datetime`. +- Choose the **None** timeframe when the query hard-codes its own dates. + +To find a dataset and its fields, browse Cloudflare's [GraphQL Analytics docs](https://developers.cloudflare.com/analytics/graphql-api/) or its guide to [exploring the schema](https://developers.cloudflare.com/analytics/graphql-api/getting-started/explore-graphql-schema/). The limits query under [Known limitations](#known-limitations) shows how far back and how wide each dataset can go on your plan. + +## 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 per plan.** Cloudflare's GraphQL Analytics API limits both how wide a single query can be and how far back it can reach, and the limits differ for every dataset. Each stream offers the timeframes its dataset allows. These limits were read from Cloudflare's own `settings` API for a Pro and a Free zone and confirmed by querying each stream at every offered timeframe: + + | Widest query / history kept | Data streams | Longest timeframe offered | + | --------------------------- | ------------ | ------------------------- | + | **1 day / 3 days** on Pro; none on Free | Zone Firewall Events | Last 24 hours (Last 7 and 30 days on higher plans - see below) | + | **30 days / 31 days** on every plan | Zone Firewall Event Volume, Zone Firewall Event Log | Last 30 days | + | **3 days / 3 days** | Health Check Events, Load Balancing Requests | Last 24 hours | + | **7 days** | Access Logins, Network Error Logs, Page Shield Reports, Worker Cron Trigger Runs | Last 7 days | + | **7 days** on Free; **30 days** on Enterprise | Turnstile Challenges | Last 7 days (Last 30 days on Enterprise Turnstile) | + | **30-31 days / 31 days** | Gateway HTTP Requests and Network Sessions, Stream Playback Quality, DNS Analytics, Zone Traffic Breakdown | Last 30 days | + | **31-32 days / 31-32 days** | Gateway DNS Queries, Email Routing, DMARC Reports, Images Requests, AI Gateway Cache and Errors, AutoRAG, Browser Rendering, Container Metrics, Hyperdrive, Queue Consumer Metrics, Realtime Usage, Vectorize, Workers AI, Account Traffic, Worker Static Asset Requests, Worker Smart Placement, Worker Build Minutes, Hyperdrive Connection Pool, R2 Bandwidth | This month | + | **32-62 days / 62-92 days** | Worker Invocations, Pages Functions, KV, D1, R2, Durable Objects, Queue Backlog and Message Operations, Pipeline Ingestion, Cache Reserve, AI Gateway Requests, DNS Firewall Analytics, Stream Minutes Viewed, Worker Subrequests, Worker Cache Requests, Queue Delayed Backlog, Durable Object Activity | Last month | + | **61 days, daily only** | Images Unique Transformations | This month | + | **93 days / 184 days** | Web Analytics Page Loads, Core Web Vitals, Web Analytics Page Load Timing | This quarter | + | **180 days / 540 days** | Audit Logs | Last quarter | + | **365 days, daily** | Zone Traffic (hourly up to two days, then daily) | This year | + + *This month*, *This quarter* and *This year* end in the future; Cloudflare counts only the part that has elapsed, so they fit a cap the full period would not. Where a cap is exactly as wide as a timeframe - a 7-day cap and Last 7 days - the query starts one minute late, because Cloudflare measures the range up to the moment it receives the query and would otherwise reject it by the request's latency. + + Limits can be wider on Business and Enterprise plans. Two streams offer timeframes that only higher plans can serve, and on a plan whose limit is shorter the tile shows an error naming that limit rather than empty data: + + - **Zone Firewall Events** offers Last 7 days and Last 30 days. Its grouped dataset, `firewallEventsAdaptiveGroups`, allows 1 day on Pro and is not available on Free. Cloudflare publishes 30-31 day limits for Security Events, but [those apply to the raw event dataset](https://developers.cloudflare.com/waf/analytics/security-events/#limits) behind **Zone Firewall Event Log**, which returns individual events rather than counts. For longer ranges use **Zone Firewall Event Volume**, which counts every event for up to 30 days on every plan, including Free, but can only filter by action and service rather than break down by them - or **Zone Firewall Event Log** for the individual events. + - **Turnstile Challenges** offers Last 30 days, which [Cloudflare documents](https://developers.cloudflare.com/turnstile/plans/) as the Enterprise lookback; Free is limited to 7 days. + + To see the limits for your own account, run this in the **GraphQL Query** stream with the **None** timeframe, a `zoneTag` in **Variables**, and **Path to rows** set to `data.viewer.zones`: + + ```graphql + query ($zoneTag: string!) { + viewer { + zones(filter: { zoneTag: $zoneTag }) { + settings { + firewallEventsAdaptiveGroups { maxDuration notOlderThan } + } + } + } + } + ``` + + `maxDuration` and `notOlderThan` are in seconds; swap in any other dataset name, or query `accounts(filter: { accountTag: $accountTag })` for account-level datasets. + +- **Time buckets follow the timeframe.** Time-series streams return one row per minute for Last hour, per 5 minutes up to 12 hours, per 15 minutes up to a day, hourly up to a week, then six-hourly or hourly up to a month (daily for R2 Operations) and daily beyond. Streams grouped by a dimension you choose, which can have many values, use coarser buckets to stay inside Cloudflare's row cap: 5 minutes for Last hour, 15 minutes up to 12 hours, hourly up to a day and daily beyond. A tile can aggregate these into coarser buckets but never finer ones. +- **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 the zone's own hostname and its subdomains, 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. GraphQL queries are by default limited to 300 per 5 minutes per token, so the plugin opts into Cloudflare's [account-based rate limiting](https://developers.cloudflare.com/analytics/graphql-api/account-based-rate-limiting/), which gives each account and each zone its own 300-per-5-minutes budget instead. Every analytics stream issues one request per selected object, so a tile scoped to hundreds of objects can still reach a per-account limit. Cloudflare documents that account-based limiting does not support a query listing several zones at the top level of `viewer`; such queries worked in testing, but if Cloudflare starts rejecting one in the **GraphQL Query** stream, nest the zones inside `accounts(filter: { accountTag: $accountTag })`. +- **Results with very many rows are truncated.** Cloudflare caps a GraphQL result at 10,000 rows (5,000 on some streams here). The time buckets above keep most time-series streams well inside it, but a stream with many distinct values can still exceed it: a breakdown such as DNS Analytics by query name on a busy zone, or Browser Rendering, which reports each session separately. Those streams order by count, so the rows dropped are the least frequent values rather than the most recent part of the range. + +- **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 with Cloudflare's error naming the limit. 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. A tile for a feature the zone or account is not entitled to shows Cloudflare's authorization error rather than empty data. +- **Account Traffic shows zones it cannot name by their zone tag.** The stream resolves each zone tag to an imported zone's name. Traffic for a zone the token cannot list - for example one outside the token's zone resources - appears as `Object not found: Cloudflare Zone/`. +- **There is no threat-type breakdown.** Cloudflare's GraphQL Analytics API, which replaced the deprecated Zone Analytics API, does not classify threats by type. The closest equivalent is **Zone Firewall Events** grouped by **Service**, which shows which security feature acted - managed rules, rate limiting, Bot Fight Mode and so on. +- **Tunnel bandwidth is not available.** Cloudflare exposes `cloudflared` traffic metrics from each connector's local metrics endpoint rather than through the API, so Tunnels show connector health only. +- **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. +- **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..4f2092ba --- /dev/null +++ b/plugins/Cloudflare/v2/metadata.json @@ -0,0 +1,107 @@ +{ + "name": "Cloudflare", + "displayName": "Cloudflare", + "version": "2.0.0", + "author": { + "name": "SquaredUp", + "type": "firstParty" + }, + "description": "Monitor traffic, security and DNS across your Cloudflare zones, plus Workers, storage, AI and Zero Trust services and how they depend on each other.", + "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" + } + ], + "screenshots": [ + "https://github.com/squaredup/plugins/blob/main/plugins/Cloudflare/v2/screenshots/overview.png", + "https://github.com/squaredup/plugins/blob/main/plugins/Cloudflare/v2/screenshots/zone.png", + "https://github.com/squaredup/plugins/blob/main/plugins/Cloudflare/v2/screenshots/d1Database.png" + ], + "base": { + "plugin": "WebAPI", + "majorVersion": "1", + "config": { + "baseUrl": "https://api.cloudflare.com/client/v4", + "authMode": "none", + "headers": [ + { + "key": "Authorization", + "value": "Bearer {{apiToken}}" + }, + { + "key": "X-Rate-Limit-Type", + "value": "account-based" + } + ] + } + } +} diff --git a/plugins/Cloudflare/v2/screenshots/d1Database.png b/plugins/Cloudflare/v2/screenshots/d1Database.png new file mode 100644 index 00000000..202e6962 Binary files /dev/null and b/plugins/Cloudflare/v2/screenshots/d1Database.png differ diff --git a/plugins/Cloudflare/v2/screenshots/overview.png b/plugins/Cloudflare/v2/screenshots/overview.png new file mode 100644 index 00000000..0fdad2fb Binary files /dev/null and b/plugins/Cloudflare/v2/screenshots/overview.png differ diff --git a/plugins/Cloudflare/v2/screenshots/zone.png b/plugins/Cloudflare/v2/screenshots/zone.png new file mode 100644 index 00000000..29aac9d0 Binary files /dev/null and b/plugins/Cloudflare/v2/screenshots/zone.png differ 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 } + } +]