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

1527 lines
37 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": "Requests (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_workers_invocations_requests{script_name=~\"$script_name\",status=~\"$status\"}[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": "Errors (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": "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_workers_invocations_errors{script_name=~\"$script_name\",status=~\"$status\"}[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": "Error Rate",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 4,
"x": 8,
"y": 1
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "percentunit",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "sum(cf_workers_invocations_errors{script_name=~\"$script_name\",status=~\"$status\"}) / clamp_min(sum(cf_workers_invocations_requests{script_name=~\"$script_name\",status=~\"$status\"}), 1)",
"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": "Subrequests (24h)",
"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": "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_workers_subrequests_subrequests{script_name=~\"$script_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": 6,
"type": "stat",
"title": "CPU Time p99",
"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": "µs",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "max(cf_workers_invocations_cpu_time_us_p99{script_name=~\"$script_name\",status=~\"$status\"})",
"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": "Duration p99",
"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": "ms",
"noValue": "0"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"editorMode": "code",
"expr": "max(cf_workers_invocations_duration_ms_p99{script_name=~\"$script_name\",status=~\"$status\"})",
"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": "Request Rate",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 5
},
"panels": []
},
{
"id": 9,
"type": "timeseries",
"title": "Requests per Script",
"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 (script_name) (max_over_time(cf_workers_invocations_requests{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 10,
"type": "timeseries",
"title": "Errors per Script",
"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": "short",
"custom": {
"drawStyle": "line",
"lineInterpolation": "smooth",
"lineWidth": 1,
"fillOpacity": 10,
"gradientMode": "none",
"spanNulls": false,
"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 (script_name) (max_over_time(cf_workers_invocations_errors{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_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": "CPU & Duration",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 14
},
"panels": []
},
{
"id": 12,
"type": "timeseries",
"title": "CPU Time p50",
"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": "µs",
"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": "max by (script_name) (max_over_time(cf_workers_invocations_cpu_time_us_p50{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 13,
"type": "timeseries",
"title": "CPU Time p99",
"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": "µs",
"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": "max by (script_name) (max_over_time(cf_workers_invocations_cpu_time_us_p99{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 14,
"type": "timeseries",
"title": "Duration p50",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 23
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "ms",
"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": "max by (script_name) (max_over_time(cf_workers_invocations_duration_ms_p50{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 15,
"type": "timeseries",
"title": "Duration p99",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 23
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "ms",
"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": "max by (script_name) (max_over_time(cf_workers_invocations_duration_ms_p99{script_name=~\"$script_name\",status=~\"$status\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 16,
"type": "row",
"title": "Subrequests",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 31
},
"panels": []
},
{
"id": 17,
"type": "timeseries",
"title": "Subrequests per Script",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 32
},
"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 (script_name) (max_over_time(cf_workers_subrequests_subrequests{script_name=~\"$script_name\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{script_name}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 18,
"type": "timeseries",
"title": "Subrequests by Status",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 32
},
"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 (http_response_status) (max_over_time(cf_workers_subrequests_subrequests{script_name=~\"$script_name\"}[1m]))",
"instant": false,
"range": true,
"legendFormat": "{{http_response_status}}",
"refId": "A"
}
],
"options": {
"legend": {
"calcs": [
"mean",
"max",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 19,
"type": "row",
"title": "Cost Estimate",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 40
},
"panels": []
},
{
"id": 20,
"type": "stat",
"title": "Estimated Daily Cost",
"description": "Before free tier.\nFree tier: 10M requests + 30M CPU-ms/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 41
},
"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_workers_invocations_requests[1m])[24h:1m])) / 1e6 * 0.30) + (sum(sum_over_time(max_over_time(cf_workers_invocations_cpu_time_us_sum[1m])[24h:1m])) / 1000 / 1e6 * 0.02)",
"instant": true,
"range": false,
"refId": "A"
}
]
},
{
"id": 21,
"type": "stat",
"title": "Projected Monthly Cost",
"description": "30-day projection based on last 24h usage.\nFree tier: 10M requests + 30M CPU-ms/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 4,
"w": 6,
"x": 6,
"y": 41
},
"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_workers_invocations_requests[1m])[24h:1m])) / 1e6 * 0.30) + (sum(sum_over_time(max_over_time(cf_workers_invocations_cpu_time_us_sum[1m])[24h:1m])) / 1000 / 1e6 * 0.02)) * 30",
"instant": true,
"range": false,
"refId": "A"
}
]
},
{
"id": 22,
"type": "timeseries",
"title": "Hourly Cost Breakdown",
"description": "Cost per hour by component, stacked.\nFree tier: 10M requests + 30M CPU-ms/mo included",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 41
},
"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_workers_invocations_requests[1m])[1h:1m])) / 1e6 * 0.30",
"legendFormat": "Requests",
"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_workers_invocations_cpu_time_us_sum[1m])[1h:1m])) / 1000 / 1e6 * 0.02",
"legendFormat": "CPU Time",
"refId": "B",
"instant": false,
"range": true
}
]
}
],
"tags": [
"cloudflare-workers",
"cloudflare-metrics",
"cloudflare-analytics"
],
"templating": {
"list": [
{
"name": "script_name",
"label": "Script",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"query": {
"query": "label_values(cf_workers_invocations_requests, script_name)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"sort": 1,
"includeAll": true,
"allValue": ".*",
"multi": true,
"hide": 0,
"definition": "label_values(cf_workers_invocations_requests, script_name)",
"options": [],
"skipUrlSync": false,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
},
{
"name": "status",
"label": "Status",
"type": "query",
"datasource": {
"type": "prometheus",
"uid": "36979063-5384-4eb9-8679-565a727cbc13"
},
"query": {
"query": "label_values(cf_workers_invocations_requests, status)",
"refId": "StandardVariableQuery"
},
"refresh": 2,
"regex": "",
"sort": 1,
"includeAll": true,
"allValue": ".*",
"multi": true,
"hide": 0,
"definition": "label_values(cf_workers_invocations_requests, status)",
"options": [],
"skipUrlSync": false,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Cloudflare — Workers",
"uid": "cf-workers",
"version": 1,
"weekStart": ""
}