Files
services/deployment/modules/cloudflare/workers/cloudflare-metrics/dashboards/r2.json
T

1142 lines
28 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"panels": [
{
"id": 1,
"type": "row",
"title": "Overview",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"panels": []
},
{
"id": 2,
"type": "stat",
"title": "Operations (24h)",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 0,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(sum_over_time(max_over_time(cf_r2_operations_requests{bucket_name=~\"$bucket_name\"}[1m])[24h:1m]))",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 3,
"type": "stat",
"title": "Bytes Egress (24h)",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 4,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "decbytes",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(sum_over_time(max_over_time(cf_r2_operations_response_object_bytes{bucket_name=~\"$bucket_name\"}[1m])[24h:1m]))",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 4,
"type": "stat",
"title": "Object Count",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 8,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum(cf_r2_storage_object_count{bucket_name=~\"$bucket_name\"}))[6h:])",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 5,
"type": "stat",
"title": "Stored Bytes",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 12,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "decbytes",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum(cf_r2_storage_payload_bytes{bucket_name=~\"$bucket_name\"}))[6h:])",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 6,
"type": "stat",
"title": "Metadata Bytes",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 16,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "decbytes",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum(cf_r2_storage_metadata_bytes{bucket_name=~\"$bucket_name\"}))[6h:])",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 7,
"type": "stat",
"title": "Response Bytes (24h)",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 20,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "decbytes",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(sum_over_time(max_over_time(cf_r2_operations_response_bytes{bucket_name=~\"$bucket_name\"}[1m])[24h:1m]))",
"instant": true,
"range": false,
"legendFormat": "__auto",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
}
},
{
"id": 8,
"type": "row",
"title": "Operations",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"panels": []
},
{
"id": 9,
"type": "timeseries",
"title": "Operation per Bucket",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 6
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 1,
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": true,
"showPoints": "never",
"pointSize": 5,
"stacking": {
"mode": "none",
"group": "A"
},
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum by (bucket_name, action_type) (max_over_time(cf_r2_operations_requests{bucket_name=~\"$bucket_name\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{bucket_name}} {{action_type}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 10,
"type": "timeseries",
"title": "Bytes Egress per Bucket",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 6
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "bytes",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 1,
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": true,
"showPoints": "never",
"pointSize": 5,
"stacking": {
"mode": "none",
"group": "A"
},
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum by (bucket_name) (max_over_time(cf_r2_operations_response_object_bytes{bucket_name=~\"$bucket_name\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{bucket_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 11,
"type": "row",
"title": "Storage",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"panels": []
},
{
"id": 12,
"type": "timeseries",
"title": "Stored Bytes",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 15
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "decbytes",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 1,
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": true,
"showPoints": "never",
"pointSize": 5,
"stacking": {
"mode": "none",
"group": "A"
},
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum by (bucket_name, storage_class) (cf_r2_storage_payload_bytes{bucket_name=~\"$bucket_name\"}))[6h:])",
"instant": false,
"range": true,
"legendFormat": "{{bucket_name}} {{storage_class}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 13,
"type": "timeseries",
"title": "Object Count",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 15
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "short",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 1,
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": true,
"showPoints": "never",
"pointSize": 5,
"stacking": {
"mode": "none",
"group": "A"
},
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
}
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum by (bucket_name, storage_class) (cf_r2_storage_object_count{bucket_name=~\"$bucket_name\"}))[6h:])",
"instant": false,
"range": true,
"legendFormat": "{{bucket_name}} {{storage_class}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 14,
"type": "row",
"title": "Cost Estimate",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 23
},
"panels": []
},
{
"id": 15,
"type": "stat",
"title": "Estimated Daily Cost",
"description": "Before free tier.\nFree tier: 1M Class A + 10M Class B + 10GB storage/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 24
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 4,
"mappings": [],
"noValue": "$0.00",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 0.1
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "(sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"PutObject|DeleteObject|CreateMultipartUpload|ListObjects|ListObjectsV2|ListMultipartUploads|ListParts\"}[1m])[24h:1m])) / 1e6 * 4.50) + (sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"GetObject|HeadObject|HeadBucket\"}[1m])[24h:1m])) / 1e6 * 0.36) + (last_over_time((sum(cf_r2_storage_payload_bytes))[6h:]) / 1073741824 * 0.015 / 30)",
"instant": true,
"range": false,
"refId": "A"
}
]
},
{
"id": 16,
"type": "stat",
"title": "Projected Monthly Cost",
"description": "30-day projection based on last 24h usage.\nFree tier: 1M Class A + 10M Class B + 10GB storage/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 24
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 4,
"mappings": [],
"noValue": "$0.00",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 0.1
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "((sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"PutObject|DeleteObject|CreateMultipartUpload|ListObjects|ListObjectsV2|ListMultipartUploads|ListParts\"}[1m])[24h:1m])) / 1e6 * 4.50) + (sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"GetObject|HeadObject|HeadBucket\"}[1m])[24h:1m])) / 1e6 * 0.36) + (last_over_time((sum(cf_r2_storage_payload_bytes))[6h:]) / 1073741824 * 0.015 / 30)) * 30",
"instant": true,
"range": false,
"refId": "A"
}
]
},
{
"id": 17,
"type": "timeseries",
"title": "Hourly Cost Breakdown",
"description": "Cost per hour by component, stacked.\nFree tier: 1M Class A + 10M Class B + 10GB storage/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 24
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 20,
"gradientMode": "none",
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 5,
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"sum",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"PutObject|DeleteObject|CreateMultipartUpload|ListObjects|ListObjectsV2|ListMultipartUploads|ListParts\"}[1m])[1h:1m])) / 1e6 * 4.50",
"legendFormat": "Class A Ops",
"refId": "A",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(sum_over_time(max_over_time(cf_r2_operations_requests{action_type=~\"GetObject|HeadObject|HeadBucket\"}[1m])[1h:1m])) / 1e6 * 0.36",
"legendFormat": "Class B Ops",
"refId": "B",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "last_over_time((sum(cf_r2_storage_payload_bytes))[6h:]) / 1073741824 * 0.015 / 30",
"legendFormat": "Storage (daily)",
"refId": "C",
"instant": false,
"range": true
}
]
}
],
"tags": [
"cloudflare-workers",
"cloudflare-metrics",
"cloudflare-analytics"
],
"templating": {
"list": [
{
"name": "bucket_name",
"label": "Bucket",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"query": {
"query": "label_values(cf_r2_operations_requests, bucket_name)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"sort": 1,
"includeAll": true,
"allValue": ".*",
"multi": true,
"hide": 0,
"definition": "label_values(cf_r2_operations_requests, bucket_name)",
"options": [],
"skipUrlSync": false,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Cloudflare — R2",
"uid": "cf-r2",
"version": 1,
"weekStart": ""
}