diff --git a/coder-observability/templates/dashboards/_dashboards_prebuilds.json.tpl b/coder-observability/templates/dashboards/_dashboards_prebuilds.json.tpl index 938b501..1e23884 100644 --- a/coder-observability/templates/dashboards/_dashboards_prebuilds.json.tpl +++ b/coder-observability/templates/dashboards/_dashboards_prebuilds.json.tpl @@ -19,107 +19,9 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 10, + "id": 132, "links": [], "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "orange", - "index": 2, - "text": "Not enabled" - }, - "1": { - "color": "green", - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "color": "orange", - "index": 1, - "text": "Not enabled" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 15, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 15 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.4.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "min(coderd_experiments{experiment=\"workspace-prebuilds\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Experiment enabled?", - "type": "stat" - }, { "datasource": { "type": "prometheus", @@ -137,7 +39,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -151,7 +53,7 @@ "gridPos": { "h": 4, "w": 4, - "x": 4, + "x": 0, "y": 0 }, "id": 49, @@ -161,6 +63,7 @@ "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -172,8 +75,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -241,7 +143,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -255,7 +157,7 @@ "gridPos": { "h": 4, "w": 4, - "x": 8, + "x": 4, "y": 0 }, "id": 48, @@ -265,6 +167,7 @@ "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -276,8 +179,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -329,6 +231,7 @@ "type": "stat" }, { + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -337,9 +240,8 @@ }, "id": 2, "panels": [], - "repeat": "template", - "repeatDirection": "h", - "title": "$template", + "repeat": "preset", + "title": "$preset", "type": "row" }, { @@ -347,6 +249,7 @@ "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -359,7 +262,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -371,18 +274,19 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 4, + "h": 3, + "w": 6, "x": 0, "y": 5 }, - "id": 31, + "id": 1, "interval": "30s", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -394,9 +298,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -405,12 +307,13 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, "instant": true, "interval": "", - "legendFormat": "Desired", + "legendFormat": "Created", "range": false, - "refId": "A" + "refId": "B" }, { "datasource": { @@ -419,13 +322,13 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Running", + "legendFormat": "Failed", "range": false, - "refId": "D" + "refId": "C" }, { "datasource": { @@ -434,16 +337,16 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Eligible", + "legendFormat": "Claimed", "range": false, - "refId": "E" + "refId": "A" } ], - "title": "Current: $preset", + "title": "All Time: $preset", "type": "stat" }, { @@ -465,8 +368,9 @@ "axisSoftMax": 10, "axisSoftMin": 0, "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 18, + "fillOpacity": 13, "gradientMode": "none", "hideFrom": { "legend": false, @@ -501,7 +405,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -514,33 +418,45 @@ { "matcher": { "id": "byName", - "options": "Desired" + "options": "Failed" }, "properties": [ { "id": "color", "value": { - "fixedColor": "purple", + "fixedColor": "red", "mode": "fixed" } - }, + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Created" + }, + "properties": [ { - "id": "custom.lineStyle", + "id": "color", "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" + "fixedColor": "blue", + "mode": "fixed" } - }, - { - "id": "custom.fillOpacity", - "value": 85 - }, + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Desired" + }, + "properties": [ { - "id": "custom.fillBelowTo", - "value": "Running" + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } } ] }, @@ -556,10 +472,6 @@ "fixedColor": "yellow", "mode": "fixed" } - }, - { - "id": "custom.fillBelowTo", - "value": "Eligible" } ] }, @@ -577,16 +489,31 @@ } } ] + }, + { + "matcher": { + "id": "byName", + "options": "Claimed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] } ] }, "gridPos": { - "h": 7, - "w": 8, - "x": 4, + "h": 6, + "w": 9, + "x": 6, "y": 5 }, - "id": 5, + "id": 38, "options": { "legend": { "calcs": [], @@ -595,13 +522,12 @@ "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -609,12 +535,13 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "hide": false, "instant": false, "interval": "", - "legendFormat": "Desired", + "legendFormat": "Created", "range": true, - "refId": "A" + "refId": "B" }, { "datasource": { @@ -622,13 +549,13 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Running", + "legendFormat": "Failed", "range": true, - "refId": "D" + "refId": "C" }, { "datasource": { @@ -636,16 +563,16 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Eligible", + "legendFormat": "Claimed", "range": true, - "refId": "E" + "refId": "F" } ], - "title": "Pool Capacity: $preset", + "title": "Pool Operations: $preset", "type": "timeseries" }, { @@ -667,8 +594,9 @@ "axisSoftMax": 10, "axisSoftMin": 0, "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 13, + "fillOpacity": 18, "gradientMode": "none", "hideFrom": { "legend": false, @@ -703,7 +631,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -716,45 +644,33 @@ { "matcher": { "id": "byName", - "options": "Failed" + "options": "Desired" }, "properties": [ { "id": "color", "value": { - "fixedColor": "red", + "fixedColor": "purple", "mode": "fixed" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Created" - }, - "properties": [ + }, { - "id": "color", + "id": "custom.lineStyle", "value": { - "fixedColor": "blue", - "mode": "fixed" + "dash": [ + 10, + 10 + ], + "fill": "dash" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Desired" - }, - "properties": [ + }, { - "id": "color", - "value": { - "fixedColor": "purple", - "mode": "fixed" - } + "id": "custom.fillOpacity", + "value": 85 + }, + { + "id": "custom.fillBelowTo", + "value": "Running" } ] }, @@ -770,6 +686,10 @@ "fixedColor": "yellow", "mode": "fixed" } + }, + { + "id": "custom.fillBelowTo", + "value": "Eligible" } ] }, @@ -787,31 +707,16 @@ } } ] - }, - { - "matcher": { - "id": "byName", - "options": "Claimed" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-green", - "mode": "fixed" - } - } - ] } ] }, "gridPos": { - "h": 7, - "w": 8, - "x": 12, + "h": 6, + "w": 9, + "x": 15, "y": 5 }, - "id": 38, + "id": 5, "options": { "legend": { "calcs": [], @@ -820,13 +725,12 @@ "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -834,13 +738,12 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", - "hide": false, + "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "instant": false, "interval": "", - "legendFormat": "Created", + "legendFormat": "Desired", "range": true, - "refId": "B" + "refId": "A" }, { "datasource": { @@ -848,13 +751,13 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Failed", + "legendFormat": "Running", "range": true, - "refId": "C" + "refId": "D" }, { "datasource": { @@ -862,16 +765,16 @@ "uid": "prometheus" }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Claimed", + "legendFormat": "Eligible", "range": true, - "refId": "F" + "refId": "E" } ], - "title": "Pool Operations: $preset", + "title": "Pool Capacity: $preset", "type": "timeseries" }, { @@ -879,7 +782,6 @@ "type": "prometheus", "uid": "prometheus" }, - "description": "", "fieldConfig": { "defaults": { "color": { @@ -892,7 +794,7 @@ "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -904,18 +806,19 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 5 + "h": 3, + "w": 6, + "x": 0, + "y": 8 }, - "id": 1, + "id": 31, "interval": "30s", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -927,9 +830,7 @@ "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -938,13 +839,12 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", - "hide": false, + "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "instant": true, "interval": "", - "legendFormat": "Created", + "legendFormat": "Desired", "range": false, - "refId": "B" + "refId": "A" }, { "datasource": { @@ -953,13 +853,13 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Failed", + "legendFormat": "Running", "range": false, - "refId": "C" + "refId": "D" }, { "datasource": { @@ -968,35 +868,536 @@ }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Claimed", + "legendFormat": "Eligible", "range": false, + "refId": "E" + } + ], + "title": "Current: $preset", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Compares the total number of regular workspace creations to prebuilt workspace claims to date.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 11 + }, + "id": 51, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "sum(max by (template_name, preset_name) (\n coderd_workspace_creation_total{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n)) or vector(0)", + "instant": false, + "legendFormat": "Regular workspaces created", + "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(max by (template_name, preset_name) (\n coderd_prebuilt_workspaces_claimed_total{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n)) or vector(0)\n", + "hide": false, + "instant": false, + "legendFormat": "Prebuilt workspaces claimed", + "range": true, + "refId": "B" } ], - "title": "All Time: $preset", + "title": "All Time: Regular vs Prebuilt", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Median (p50) build time in seconds for Regular Workspace Creation, Prebuilt Workspace Creation, and Prebuilt Workspace Claim", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Regular Creation" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuild Creation" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuilt Claim" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 6, + "y": 11 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"regular\"\n }\n )\n)\nor vector(0)", + "legendFormat": "Regular Creation", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"prebuild\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Creation", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_prebuilt_workspace_claim_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Claim", + "range": true, + "refId": "C" + } + ], + "title": "Workspace Build Latency p50", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "95th-percentile (p95) build time in seconds for Regular Workspace Creation, Prebuilt Workspace Creation, and Prebuilt Workspace Claim.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Regular Creation" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuild Creation" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuilt Claim" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 15, + "y": 11 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"regular\"\n }\n )\n)\nor vector(0)", + "legendFormat": "Regular Creation", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"prebuild\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Creation", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_prebuilt_workspace_claim_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Claim", + "range": true, + "refId": "C" + } + ], + "title": "Workspace Build Latency p95", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 75 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 14 + }, + "id": 54, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "expr": "clamp_max(\n 100 *\n (\n sum(\n coderd_prebuilt_workspaces_claimed_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0)\n )\n /\n clamp_min(\n ( \n sum(\n coderd_prebuilt_workspaces_claimed_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0))\n +\n (\n sum(\n coderd_workspace_creation_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0)),\n 1\n ),\n 100\n)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "All Time: Prebuilds Usage %", "type": "stat" } ], + "preload": false, "refresh": "{{- include "dashboard-refresh" . -}}", - "schemaVersion": 39, + "schemaVersion": 41, "tags": [], "templating": { "list": [ { - "allValue": "", + "current": { + "text": "coder", + "value": "coder" + }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "label_values(coderd_prebuilt_workspaces_desired,template_name)", - "hide": 0, "includeAll": false, "label": "Template", - "multi": false, "name": "template", "options": [], "query": { @@ -1006,18 +1407,22 @@ }, "refresh": 1, "regex": "", - "skipUrlSync": false, - "sort": 0, "type": "query" }, { - "allValue": "", + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "label_values(coderd_prebuilt_workspaces_desired{template_name=~\"$template\"},preset_name)", - "hide": 0, "includeAll": true, "label": "Preset", "multi": true, @@ -1030,8 +1435,6 @@ }, "refresh": 1, "regex": "", - "skipUrlSync": false, - "sort": 0, "type": "query" } ] @@ -1044,7 +1447,6 @@ "timezone": "browser", "title": "Prebuilds", "uid": "cej6jysyme22oa", - "version": 13, - "weekStart": "" + "version": 5 } {{ end }} \ No newline at end of file diff --git a/compiled/resources.yaml b/compiled/resources.yaml index ebd6f94..b983cc3 100644 --- a/compiled/resources.yaml +++ b/compiled/resources.yaml @@ -2529,107 +2529,9 @@ data: "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 10, + "id": 132, "links": [], "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "orange", - "index": 2, - "text": "Not enabled" - }, - "1": { - "color": "green", - "index": 0, - "text": "Enabled" - } - }, - "type": "value" - }, - { - "options": { - "match": "null", - "result": { - "color": "orange", - "index": 1, - "text": "Not enabled" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 15, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 15 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.4.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "expr": "min(coderd_experiments{experiment=\"workspace-prebuilds\"})", - "instant": true, - "legendFormat": "__auto", - "range": false, - "refId": "A" - } - ], - "title": "Experiment enabled?", - "type": "stat" - }, { "datasource": { "type": "prometheus", @@ -2647,7 +2549,7 @@ data: "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -2661,7 +2563,7 @@ data: "gridPos": { "h": 4, "w": 4, - "x": 4, + "x": 0, "y": 0 }, "id": 49, @@ -2671,6 +2573,7 @@ data: "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -2682,8 +2585,7 @@ data: "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -2751,7 +2653,7 @@ data: "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -2765,7 +2667,7 @@ data: "gridPos": { "h": 4, "w": 4, - "x": 8, + "x": 4, "y": 0 }, "id": 48, @@ -2775,6 +2677,7 @@ data: "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -2786,8 +2689,7 @@ data: "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -2839,6 +2741,7 @@ data: "type": "stat" }, { + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -2847,9 +2750,8 @@ data: }, "id": 2, "panels": [], - "repeat": "template", - "repeatDirection": "h", - "title": "$template", + "repeat": "preset", + "title": "$preset", "type": "row" }, { @@ -2857,6 +2759,7 @@ data: "type": "prometheus", "uid": "prometheus" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -2869,7 +2772,7 @@ data: "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -2881,18 +2784,19 @@ data: "overrides": [] }, "gridPos": { - "h": 7, - "w": 4, + "h": 3, + "w": 6, "x": 0, "y": 5 }, - "id": 31, + "id": 1, "interval": "30s", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "center", "orientation": "vertical", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -2904,9 +2808,7 @@ data: "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -2915,12 +2817,13 @@ data: }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, "instant": true, "interval": "", - "legendFormat": "Desired", + "legendFormat": "Created", "range": false, - "refId": "A" + "refId": "B" }, { "datasource": { @@ -2929,13 +2832,13 @@ data: }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Running", + "legendFormat": "Failed", "range": false, - "refId": "D" + "refId": "C" }, { "datasource": { @@ -2944,16 +2847,16 @@ data: }, "editorMode": "code", "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "max(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", "hide": false, "instant": true, "interval": "", - "legendFormat": "Eligible", + "legendFormat": "Claimed", "range": false, - "refId": "E" + "refId": "A" } ], - "title": "Current: $preset", + "title": "All Time: $preset", "type": "stat" }, { @@ -2975,8 +2878,9 @@ data: "axisSoftMax": 10, "axisSoftMin": 0, "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 18, + "fillOpacity": 13, "gradientMode": "none", "hideFrom": { "legend": false, @@ -3011,7 +2915,7 @@ data: "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -3024,33 +2928,45 @@ data: { "matcher": { "id": "byName", - "options": "Desired" + "options": "Failed" }, "properties": [ { "id": "color", "value": { - "fixedColor": "purple", + "fixedColor": "red", "mode": "fixed" } - }, + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Created" + }, + "properties": [ { - "id": "custom.lineStyle", + "id": "color", "value": { - "dash": [ - 10, - 10 - ], - "fill": "dash" + "fixedColor": "blue", + "mode": "fixed" } - }, - { - "id": "custom.fillOpacity", - "value": 85 - }, + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Desired" + }, + "properties": [ { - "id": "custom.fillBelowTo", - "value": "Running" + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } } ] }, @@ -3066,10 +2982,6 @@ data: "fixedColor": "yellow", "mode": "fixed" } - }, - { - "id": "custom.fillBelowTo", - "value": "Eligible" } ] }, @@ -3087,16 +2999,31 @@ data: } } ] + }, + { + "matcher": { + "id": "byName", + "options": "Claimed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] } ] }, "gridPos": { - "h": 7, - "w": 8, - "x": 4, + "h": 6, + "w": 9, + "x": 6, "y": 5 }, - "id": 5, + "id": 38, "options": { "legend": { "calcs": [], @@ -3105,13 +3032,12 @@ data: "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { "datasource": { @@ -3119,12 +3045,13 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "hide": false, "instant": false, "interval": "", - "legendFormat": "Desired", + "legendFormat": "Created", "range": true, - "refId": "A" + "refId": "B" }, { "datasource": { @@ -3132,13 +3059,13 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Running", + "legendFormat": "Failed", "range": true, - "refId": "D" + "refId": "C" }, { "datasource": { @@ -3146,16 +3073,16 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "expr": "floor(max(increase(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", "hide": false, "instant": false, "interval": "", - "legendFormat": "Eligible", + "legendFormat": "Claimed", "range": true, - "refId": "E" + "refId": "F" } ], - "title": "Pool Capacity: $preset", + "title": "Pool Operations: $preset", "type": "timeseries" }, { @@ -3177,8 +3104,9 @@ data: "axisSoftMax": 10, "axisSoftMin": 0, "barAlignment": 0, + "barWidthFactor": 0.6, "drawStyle": "line", - "fillOpacity": 13, + "fillOpacity": 18, "gradientMode": "none", "hideFrom": { "legend": false, @@ -3213,7 +3141,7 @@ data: "steps": [ { "color": "green", - "value": null + "value": 0 }, { "color": "red", @@ -3226,43 +3154,415 @@ data: { "matcher": { "id": "byName", - "options": "Failed" + "options": "Desired" }, "properties": [ { "id": "color", "value": { - "fixedColor": "red", + "fixedColor": "purple", "mode": "fixed" } + }, + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + }, + { + "id": "custom.fillOpacity", + "value": 85 + }, + { + "id": "custom.fillBelowTo", + "value": "Running" } ] }, { "matcher": { "id": "byName", - "options": "Created" + "options": "Running" }, "properties": [ { "id": "color", "value": { - "fixedColor": "blue", + "fixedColor": "yellow", "mode": "fixed" } + }, + { + "id": "custom.fillBelowTo", + "value": "Eligible" } ] }, { "matcher": { "id": "byName", - "options": "Desired" + "options": "Eligible" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 15, + "y": 5 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "instant": false, + "interval": "", + "legendFormat": "Desired", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Running", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Eligible", + "range": true, + "refId": "E" + } + ], + "title": "Pool Capacity: $preset", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 31, + "interval": "30s", + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "vertical", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(coderd_prebuilt_workspaces_desired{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "Desired", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(coderd_prebuilt_workspaces_running{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Running", + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max(coderd_prebuilt_workspaces_eligible{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Eligible", + "range": false, + "refId": "E" + } + ], + "title": "Current: $preset", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Compares the total number of regular workspace creations to prebuilt workspace claims to date.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 11 + }, + "id": 51, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "exemplar": false, + "expr": "sum(max by (template_name, preset_name) (\n coderd_workspace_creation_total{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n)) or vector(0)", + "instant": false, + "legendFormat": "Regular workspaces created", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(max by (template_name, preset_name) (\n coderd_prebuilt_workspaces_claimed_total{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n)) or vector(0)\n", + "hide": false, + "instant": false, + "legendFormat": "Prebuilt workspaces claimed", + "range": true, + "refId": "B" + } + ], + "title": "All Time: Regular vs Prebuilt", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "Median (p50) build time in seconds for Regular Workspace Creation, Prebuilt Workspace Creation, and Prebuilt Workspace Claim", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Regular Creation" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuild Creation" }, "properties": [ { "id": "color", "value": { - "fixedColor": "purple", + "fixedColor": "yellow", "mode": "fixed" } } @@ -3271,28 +3571,157 @@ data: { "matcher": { "id": "byName", - "options": "Running" + "options": "Prebuilt Claim" }, "properties": [ { "id": "color", "value": { - "fixedColor": "yellow", + "fixedColor": "green", "mode": "fixed" } } ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 6, + "y": 11 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.1.0", + "targets": [ + { + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"regular\"\n }\n )\n)\nor vector(0)", + "legendFormat": "Regular Creation", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"prebuild\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Creation", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.5,\n sum(\n coderd_prebuilt_workspace_claim_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n )\n)\nor vector(0)", + "hide": false, + "instant": false, + "legendFormat": "Prebuild Claim", + "range": true, + "refId": "C" + } + ], + "title": "Workspace Build Latency p50", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "95th-percentile (p95) build time in seconds for Regular Workspace Creation, Prebuilt Workspace Creation, and Prebuilt Workspace Claim.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineStyle": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] }, + "unit": "s" + }, + "overrides": [ { "matcher": { "id": "byName", - "options": "Eligible" + "options": "Regular Creation" }, "properties": [ { "id": "color", "value": { - "fixedColor": "green", + "fixedColor": "blue", "mode": "fixed" } } @@ -3301,13 +3730,28 @@ data: { "matcher": { "id": "byName", - "options": "Claimed" + "options": "Prebuild Creation" }, "properties": [ { "id": "color", "value": { - "fixedColor": "dark-green", + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Prebuilt Claim" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", "mode": "fixed" } } @@ -3316,12 +3760,12 @@ data: ] }, "gridPos": { - "h": 7, - "w": 8, - "x": 12, - "y": 5 + "h": 6, + "w": 9, + "x": 15, + "y": 11 }, - "id": 38, + "id": 53, "options": { "legend": { "calcs": [], @@ -3330,27 +3774,19 @@ data: "showLegend": true }, "tooltip": { + "hideZeros": false, "mode": "single", "sort": "none" } }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "Created", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"regular\"\n }\n )\n)\nor vector(0)", + "legendFormat": "Regular Creation", "range": true, - "refId": "B" + "refId": "A" }, { "datasource": { @@ -3358,13 +3794,12 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_workspace_creation_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\", type=\"prebuild\"\n }\n )\n)\nor vector(0)", "hide": false, "instant": false, - "interval": "", - "legendFormat": "Failed", + "legendFormat": "Prebuild Creation", "range": true, - "refId": "C" + "refId": "B" }, { "datasource": { @@ -3372,16 +3807,15 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "floor(max(increase(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}[$__rate_interval]))) or vector(0)", + "expr": "histogram_quantile(0.95,\n sum(\n coderd_prebuilt_workspace_claim_duration_seconds{\n template_name=~\"$template\", preset_name=~\"$preset\"\n }\n )\n)\nor vector(0)", "hide": false, "instant": false, - "interval": "", - "legendFormat": "Claimed", + "legendFormat": "Prebuild Claim", "range": true, - "refId": "F" + "refId": "C" } ], - "title": "Pool Operations: $preset", + "title": "Workspace Build Latency p95", "type": "timeseries" }, { @@ -3389,43 +3823,48 @@ data: "type": "prometheus", "uid": "prometheus" }, - "description": "", "fieldConfig": { "defaults": { "color": { - "fixedColor": "text", - "mode": "fixed" + "mode": "thresholds" }, "mappings": [], + "max": 100, + "min": 0, "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "red", + "value": 0 }, { - "color": "red", - "value": 80 + "color": "#EAB839", + "value": 50 + }, + { + "color": "green", + "value": 75 } ] - } + }, + "unit": "percent" }, "overrides": [] }, "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 5 + "h": 3, + "w": 6, + "x": 0, + "y": 14 }, - "id": 1, - "interval": "30s", + "id": 54, "options": { "colorMode": "value", "graphMode": "area", - "justifyMode": "center", - "orientation": "vertical", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -3437,76 +3876,38 @@ data: "textMode": "auto", "wideLayout": true }, - "pluginVersion": "10.4.3", - "repeat": "preset", - "repeatDirection": "v", + "pluginVersion": "12.1.0", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_created_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Created", - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, - "editorMode": "code", - "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_failed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Failed", - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "prometheus" - }, "editorMode": "code", - "exemplar": false, - "expr": "max(coderd_prebuilt_workspaces_claimed_total{template_name=~\"$template\", preset_name=~\"$preset\"}) or vector(0)", - "hide": false, - "instant": true, - "interval": "", - "legendFormat": "Claimed", - "range": false, + "expr": "clamp_max(\n 100 *\n (\n sum(\n coderd_prebuilt_workspaces_claimed_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0)\n )\n /\n clamp_min(\n ( \n sum(\n coderd_prebuilt_workspaces_claimed_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0))\n +\n (\n sum(\n coderd_workspace_creation_total{\n template_name=\"$template\", preset_name=\"$preset\"\n }\n ) or vector(0)),\n 1\n ),\n 100\n)", + "legendFormat": "__auto", + "range": true, "refId": "A" } ], - "title": "All Time: $preset", + "title": "All Time: Prebuilds Usage %", "type": "stat" } ], + "preload": false, "refresh": "30s", - "schemaVersion": 39, + "schemaVersion": 41, "tags": [], "templating": { "list": [ { - "allValue": "", + "current": { + "text": "coder", + "value": "coder" + }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "label_values(coderd_prebuilt_workspaces_desired,template_name)", - "hide": 0, "includeAll": false, "label": "Template", - "multi": false, "name": "template", "options": [], "query": { @@ -3516,18 +3917,22 @@ data: }, "refresh": 1, "regex": "", - "skipUrlSync": false, - "sort": 0, "type": "query" }, { - "allValue": "", + "current": { + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "label_values(coderd_prebuilt_workspaces_desired{template_name=~\"$template\"},preset_name)", - "hide": 0, "includeAll": true, "label": "Preset", "multi": true, @@ -3540,8 +3945,6 @@ data: }, "refresh": 1, "regex": "", - "skipUrlSync": false, - "sort": 0, "type": "query" } ] @@ -3554,8 +3957,7 @@ data: "timezone": "browser", "title": "Prebuilds", "uid": "cej6jysyme22oa", - "version": 13, - "weekStart": "" + "version": 5 } --- # Source: coder-observability/templates/dashboards/configmap-dashboards-provisionerd.yaml