From 932f15ee8fdc8b26384d3f0f8ff0218604cac27b Mon Sep 17 00:00:00 2001 From: Chris Randles Date: Wed, 25 Feb 2026 22:37:35 -0500 Subject: [PATCH 1/2] chore: extend developer dashboard; add k6 load test Signed-off-by: Chris Randles --- docs/chunked_caching.md | 2 - .../dashboards/trickster-prometheus.json | 2985 +++++++++++------ .../provisioning/datasources/datasource.yaml | 10 + .../trickster-config/trickster.yaml | 19 +- hack/load-test/Makefile | 17 + hack/load-test/README.md | 36 + hack/load-test/basic.js | 39 + 7 files changed, 1994 insertions(+), 1114 deletions(-) create mode 100644 hack/load-test/Makefile create mode 100644 hack/load-test/README.md create mode 100644 hack/load-test/basic.js diff --git a/docs/chunked_caching.md b/docs/chunked_caching.md index ea2ceb36a..2f447081a 100644 --- a/docs/chunked_caching.md +++ b/docs/chunked_caching.md @@ -16,7 +16,6 @@ Chunked caching can be enabled and disabled using `use_cache_chunking`: ```yaml fs1: - cache_type: filesystem provider: filesystem use_cache_chunking: true timeseries_chunk_factor: 420 @@ -58,7 +57,6 @@ frontend: caches: mem1: - cache_type: memory provider: memory index: max_size_objects: 512 diff --git a/docs/developer/environment/docker-compose-data/dashboards/trickster-prometheus.json b/docs/developer/environment/docker-compose-data/dashboards/trickster-prometheus.json index 97e197c20..059d75d78 100644 --- a/docs/developer/environment/docker-compose-data/dashboards/trickster-prometheus.json +++ b/docs/developer/environment/docker-compose-data/dashboards/trickster-prometheus.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -14,10 +17,9 @@ }, "description": "Trickster Developer Dashboard for Prometheus", "editable": true, - "gnetId": 3681, + "fiscalYearStartMonth": 0, "graphTooltip": 1, - "id": 2, - "iteration": 1588708030077, + "id": 5, "links": [ { "icon": "question", @@ -50,8 +52,10 @@ ], "panels": [ { - "content": "\n", - "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "h": 3, "w": 1, @@ -59,112 +63,183 @@ "y": 0 }, "id": 80, - "mode": "html", - "timeFrom": null, - "timeShift": null, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "\n", + "mode": "html" + }, + "pluginVersion": "11.6.0", "title": "", "transparent": true, "type": "text" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorPostfix": false, - "colorValue": true, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "datasource": "$datasource", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + }, + { + "options": { + "0": { + "text": "✗" + } + }, + "type": "value" + }, + { + "options": { + "1": { + "text": "✓" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.1 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, "gridPos": { "h": 3, - "w": 1, + "w": 2, "x": 1, "y": 0 }, "id": 82, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "pluginVersion": "6.4.2", - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "#73BF69", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "up{job=\"trickster\"}", "instant": true, "refId": "A" } ], - "thresholds": "0.1,1", - "timeFrom": null, - "timeShift": null, "title": "Up?", "transparent": true, - "type": "singlestat", - "valueFontSize": "120%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } }, - { - "op": "=", - "text": "✗", - "value": "0" + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 0 + }, + "id": 92, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ { - "op": "=", - "text": "✓", - "value": "1" + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "go_sched_gomaxprocs_threads{job=\"trickster\"}", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" } ], - "valueName": "current" + "title": "GOMAXPROCS", + "type": "stat" }, { "collapsed": false, - "datasource": "${DS_PROMETHEUS}", "gridPos": { "h": 1, "w": 24, @@ -177,140 +252,218 @@ "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, "gridPos": { "h": 8, "w": 8, "x": 0, "y": 4 }, - "hiddenSeries": false, "id": 57, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "go_goroutines{job=\"trickster\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Goroutine Total", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "trickster": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "trickster" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trickster" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 8, "y": 4 }, - "hiddenSeries": false, "id": 84, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "go_memstats_alloc_bytes{job=\"trickster\"}", "format": "time_series", "intervalFactor": 1, @@ -318,154 +471,385 @@ "refId": "A" }, { + "datasource": { + "uid": "$datasource" + }, "expr": "go_memstats_heap_alloc_bytes{job=\"trickster\"}", "format": "time_series", "intervalFactor": 1, "legendFormat": "heap", "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + }, { - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "uid": "$datasource" + }, + "expr": "go_memstats_sys_bytes{job=\"trickster\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "sys", + "refId": "C" }, { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "process_resident_memory_bytes{job=\"trickster\"}", + "hide": false, + "instant": false, + "legendFormat": "process", + "range": true, + "refId": "D" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Memory Usage", + "type": "timeseries" }, { - "aliasColors": { - "trickster": "super-light-red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "trickster" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "trickster" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 16, "y": 4 }, - "hiddenSeries": false, "id": 63, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { - "expr": "go_memstats_gc_cpu_fraction{job=\"trickster\"}", + "datasource": { + "uid": "$datasource" + }, + "expr": "rate(process_cpu_seconds_total{job=\"trickster\"}[1m])", "format": "time_series", "intervalFactor": 1, + "legendFormat": "cpu", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Trickster GC CPU Fraction", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + "title": "Trickster CPU Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "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": "linear", + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 12 + }, + "id": 89, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(go_gc_duration_seconds_sum{job=\"trickster\"}[5m])) / sum(rate(go_gc_duration_seconds_count{job=\"trickster\"}[5m]))", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Go GC Duration (Average)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "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": "linear", + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 12 + }, + "id": 93, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(process_network_transmit_bytes_total{job=\"trickster\"}[5m]))", + "instant": false, + "legendFormat": "TX", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(process_network_receive_bytes_total{job=\"trickster\"}[5m]))", + "hide": false, + "instant": false, + "legendFormat": "RX", + "range": true, + "refId": "B" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Processed Bytes Last 5m", + "type": "timeseries" }, { "collapsed": false, - "datasource": "${DS_PROMETHEUS}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 12 + "y": 20 }, "id": 68, "panels": [], @@ -473,56 +857,123 @@ "type": "row" }, { - "aliasColors": { - "proxy-error": "dark-red", - "proxy-only": "rgba(204, 204, 204, 0.8)" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "proxy-error" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "proxy-only" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "rgba(204, 204, 204, 0.8)", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 0, - "y": 13 + "y": 21 }, - "hiddenSeries": false, "id": 61, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "proxy-error" + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(delta(trickster_proxy_requests_total{job=\"trickster\"}[1m])) by (cache_status)", "format": "time_series", "intervalFactor": 1, @@ -530,99 +981,115 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Time Series Cache Efficiency - All Caches", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "default": "light-blue" + "datasource": { + "uid": "$datasource" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", "description": "", - "editable": true, - "error": false, - "fill": 1, - "fillGradient": 0, - "grid": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "default" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 8, - "y": 13 + "y": 21 }, - "hiddenSeries": false, "id": 25, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "max", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(trickster_cache_usage_bytes{job=\"trickster\"}) by (cache_name)", "format": "time_series", "interval": "", @@ -633,100 +1100,114 @@ "step": 300 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Cache Utilization (# Bytes)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 2, - "format": "decbytes", - "label": "", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "default": "super-light-red" + "datasource": { + "uid": "$datasource" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", "description": "", - "editable": true, - "error": false, - "fill": 1, - "fillGradient": 0, - "grid": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "default" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-red", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 16, - "y": 13 + "y": 21 }, - "hiddenSeries": false, "id": 64, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "sort": "max", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(trickster_cache_usage_objects{job=\"trickster\"}) by (cache_name)", "format": "time_series", "interval": "", @@ -737,337 +1218,354 @@ "step": 300 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Cache Utilization (# Objects)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "default": "super-light-yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "default" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 0, - "y": 21 + "y": 29 }, - "hiddenSeries": false, "id": 15, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(delta(trickster_cache_events_total{event=\"eviction\",job=\"trickster\"}[1m])) by (cache_name)", "legendFormat": "{{cache_name}}", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Cache Object Evictions", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "default": "super-light-yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "default" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 8, - "y": 21 + "y": 29 }, - "hiddenSeries": false, "id": 77, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(delta(trickster_cache_operation_bytes_total{job=\"trickster\"}[1m])) by (cache_name, operation)", "legendFormat": "{{cache_name}} - {{operation}}", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Cache Operations (Bytes)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "default": "super-light-yellow" + "datasource": { + "uid": "$datasource" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", "description": "", - "editable": true, - "error": false, - "fill": 1, - "fillGradient": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "default" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-yellow", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 16, - "y": 21 + "y": 29 }, - "hiddenSeries": false, "id": 78, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(delta(trickster_cache_operation_objects_total{job=\"trickster\"}[1m])) by (cache_name, operation)", "legendFormat": "{{cache_name}} - {{operation}}", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Cache Operations (Objects)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "collapsed": false, - "datasource": "${DS_PROMETHEUS}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 29 + "y": 37 }, "id": 70, "panels": [], @@ -1075,50 +1573,108 @@ "type": "row" }, { - "aliasColors": { - "sim1 - 5xx": "dark-red" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "sim1 - 5xx" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 0, - "y": 30 + "y": 38 }, - "hiddenSeries": false, "id": 71, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_frontend_requests_total{job=\"trickster\",job=\"trickster\"}[1m])) by (backend_name, http_status)", "format": "time_series", "intervalFactor": 1, @@ -1126,101 +1682,143 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Trickster Frontend Responses by Origin & Type", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "prom1": "light-purple", - "total": "dark-green" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "prom1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "total" + }, + "properties": [ + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.lineWidth", + "value": 2 + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 8, - "y": 30 + "y": 38 }, - "hiddenSeries": false, "id": 72, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "total", - "fill": 0, - "linewidth": 2 + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - {} - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_frontend_written_bytes_total{job=\"trickster\",job=\"trickster\"}[1m])) by (backend_name)", "format": "time_series", "intervalFactor": 1, @@ -1228,6 +1826,9 @@ "refId": "A" }, { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_frontend_written_bytes_total{job=\"trickster\",job=\"trickster\"}[1m]))", "format": "time_series", "intervalFactor": 1, @@ -1235,95 +1836,157 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "# Bytes Written to Frontend by Origin", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "accepted": "purple", - "failed": "dark-red", - "requested": "semi-dark-yellow", - "sum(idelta(trickster_proxy_accepted_connections_total{job=\"trickster\"}[1m])) ": "light-purple" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "accepted" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failed" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "requested" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "sum(idelta(trickster_proxy_accepted_connections_total{job=\"trickster\"}[1m])) " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-purple", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 16, - "y": 30 + "y": 38 }, - "hiddenSeries": false, "id": 73, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_proxy_requested_connections_total{job=\"trickster\"}[1m])) ", "format": "time_series", "intervalFactor": 1, @@ -1331,6 +1994,9 @@ "refId": "B" }, { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_proxy_accepted_connections_total{job=\"trickster\"}[1m])) ", "format": "time_series", "intervalFactor": 1, @@ -1338,6 +2004,9 @@ "refId": "A" }, { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_proxy_closed_connections_total{job=\"trickster\"}[1m])) ", "format": "time_series", "intervalFactor": 1, @@ -1345,6 +2014,9 @@ "refId": "C" }, { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_proxy_failed_connections_total{job=\"trickster\"}[1m])) ", "format": "time_series", "intervalFactor": 1, @@ -1352,55 +2024,95 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "# Inbound Connections Handled", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "log": 2, + "type": "log" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 91, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-blue", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Blues", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { "show": true }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "multi", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisLabel": "", + "axisPlacement": "auto", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.0", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(trickster_frontend_requests_duration_seconds_bucket{job=\"trickster\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Frontend Request Duration Heatmap", + "type": "heatmap" }, { "collapsed": false, - "datasource": "${DS_PROMETHEUS}", "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 38 + "y": 54 }, "id": 88, "panels": [], @@ -1408,50 +2120,108 @@ "type": "row" }, { - "aliasColors": { - "sum(idelta(trickster_proxy_accepted_connections_total{job=\"trickster\"}[1m])) ": "light-purple" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "fillGradient": 0, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "sum(idelta(trickster_proxy_accepted_connections_total{job=\"trickster\"}[1m])) " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-purple", + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { "h": 8, "w": 8, "x": 0, - "y": 39 + "y": 55 }, - "hiddenSeries": false, "id": 76, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "dataLinks": [] - }, - "paceLength": 10, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "dataLinks": [], + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", "targets": [ { + "datasource": { + "uid": "$datasource" + }, "expr": "sum(idelta(trickster_proxy_requests_total{job=\"trickster\"}[1m])) by (backend_name)", "format": "time_series", "intervalFactor": 1, @@ -1459,71 +2229,107 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "# Backend Requests Total", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", + "type": "timeseries" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "log": 2, + "type": "log" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 55 + }, + "id": 90, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Oranges", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { "show": true }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "multi", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisLabel": "", + "axisPlacement": "auto", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.6.0", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(trickster_proxy_request_duration_seconds_bucket{job=\"trickster\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "intervalFactor": 1, + "legendFormat": "{{le}}", + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Request Duration Heatmap", + "type": "heatmap" } ], + "preload": false, "refresh": "5s", - "schemaVersion": 22, - "style": "dark", + "schemaVersion": 41, "tags": [], "templating": { "list": [ { "current": { - "selected": true, - "tags": [], - "text": "prom-trickster-memory-stdout", - "value": "prom-trickster-memory-stdout" + "text": "1: Prom | Direct | GET", + "value": "ds_prom_direct" }, - "hide": 0, "includeAll": false, "label": "Prometheus datasource", - "multi": false, "name": "datasource", "options": [], "query": "prometheus", "refresh": 1, "regex": "", - "skipUrlSync": false, "type": "datasource" } ] @@ -1532,36 +2338,9 @@ "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, + "timepicker": {}, "timezone": "browser", "title": "Prometheus", "uid": "uAJ8w1wZz", - "variables": { - "list": [] - }, - "version": 4 -} + "version": 12 +} \ No newline at end of file diff --git a/docs/developer/environment/docker-compose-data/grafana-config/provisioning/datasources/datasource.yaml b/docs/developer/environment/docker-compose-data/grafana-config/provisioning/datasources/datasource.yaml index de6ee0027..e567c6f5c 100644 --- a/docs/developer/environment/docker-compose-data/grafana-config/provisioning/datasources/datasource.yaml +++ b/docs/developer/environment/docker-compose-data/grafana-config/provisioning/datasources/datasource.yaml @@ -73,6 +73,16 @@ datasources: editable: true jsonData: httpMethod: POST +- name: "8: Trickster | Redis | GET" + type: prometheus + access: proxy + orgId: 1 + uid: ds_prom_trickster_redis_get + url: http://host.docker.internal:8480/prom3 + version: 1 + editable: true + jsonData: + httpMethod: GET # Mockster (Prom API Simulator) - name: sim-direct diff --git a/docs/developer/environment/trickster-config/trickster.yaml b/docs/developer/environment/trickster-config/trickster.yaml index c30ec4174..0e2df8cad 100644 --- a/docs/developer/environment/trickster-config/trickster.yaml +++ b/docs/developer/environment/trickster-config/trickster.yaml @@ -8,20 +8,17 @@ negative_caches: '502': 3s caches: mem1: - cache_type: memory provider: memory - index: - max_size_objects: 512 - max_size_backoff_objects: 128 mem2: - cache_type: memory provider: memory - index: - max_size_objects: 1024 - max_size_backoff_objects: 128 fs1: - cache_type: filesystem provider: filesystem + redis: + provider: redis + redis: + client_type: standard + endpoint: localhost:6379 + protocol: tcp request_rewriters: remove-accept-encoding: instructions: @@ -114,6 +111,10 @@ backends: provider: prometheus origin_url: 'http://127.0.0.1:9090' cache_name: fs1 + prom3: + provider: prometheus + origin_url: 'http://127.0.0.1:9090' + cache_name: redis flux1: provider: influxdb origin_url: 'http://127.0.0.1:8186/' diff --git a/hack/load-test/Makefile b/hack/load-test/Makefile new file mode 100644 index 000000000..e7bc5e035 --- /dev/null +++ b/hack/load-test/Makefile @@ -0,0 +1,17 @@ +TRICKSTER_BASE_ENDPOINT ?= http://localhost:8480/prom1 +PROMQL_QUERY ?= rate(process_cpu_seconds_total[5m]) + +VIRTUAL_USERS ?= 50 +BATCH_SIZE ?= 100 +ITERATIONS ?= 500000 + +run: + for file in $$(find . -name '*.js'); do \ + echo "Running load test: $$file"; \ + k6 run \ + --vus $(VIRTUAL_USERS) \ + --batch $(BATCH_SIZE) \ + --iterations $(ITERATIONS) \ + --env TRICKSTER_BASE_ENDPOINT="$(TRICKSTER_BASE_ENDPOINT)" \ + --env PROMQL_QUERY="$(PROMQL_QUERY)" $$file; \ + done diff --git a/hack/load-test/README.md b/hack/load-test/README.md new file mode 100644 index 000000000..18cc184a7 --- /dev/null +++ b/hack/load-test/README.md @@ -0,0 +1,36 @@ +# Load Tests + +Load tests for Trickster using [k6](https://k6.io/). + +## Prerequisites + +Install k6: https://grafana.com/docs/k6/latest/set-up/install-k6/ + +## Running + +```sh +make run +``` + +This runs all `*.js` test scripts against the default endpoint (`http://localhost:8480/prom1`). + +### Variables + +| Variable | Default | Description | +|---|---|---| +| `TRICKSTER_BASE_ENDPOINT` | `http://localhost:8480/prom1` | Base URL of the Trickster backend to test | +| `PROMQL_QUERY` | `rate(process_cpu_seconds_total[5m])` | PromQL query to execute | +| `VIRTUAL_USERS` | `50` | Number of concurrent virtual users | +| `BATCH_SIZE` | `100` | Number of parallel HTTP requests per VU | +| `ITERATIONS` | `5000` | Total number of iterations across all VUs | + +Override any variable on the command line: + +```sh +make run TRICKSTER_BASE_ENDPOINT=http://localhost:8480/myprom PROMQL_QUERY='up' VIRTUAL_USERS=10 ITERATIONS=1000 +``` + +## Test scripts + +**basic.js** — Runs a PromQL instant query (controlled by `PROMQL_QUERY`) in a 30-second ramp-up +to 10 VUs. Passes if 95% of requests complete under 500 ms and >99% return a successful response. diff --git a/hack/load-test/basic.js b/hack/load-test/basic.js new file mode 100644 index 000000000..328d3778f --- /dev/null +++ b/hack/load-test/basic.js @@ -0,0 +1,39 @@ +import http from 'k6/http'; +import { check, sleep } from 'k6'; + +export const options = { + stages: [ + { duration: '30s', target: 10 }, + ], + thresholds: { + http_req_duration: ['p(95)<500'], // 95% of requests must be below 500ms + 'checks': ['rate>0.99'], // More than 99% of requests must pass checks + }, +}; + +function getBaseEndpoint() { + const url = __ENV.TRICKSTER_BASE_ENDPOINT; + return url; +} + +function getQuery() { + return __ENV.PROMQL_QUERY || 'rate(process_cpu_seconds_total[5m])'; +} + +export default function () { + const QUERY_ENDPOINT = '/api/v1/query'; + const fullUrl = `${getBaseEndpoint()}${QUERY_ENDPOINT}?query=${encodeURIComponent(getQuery())}`; + const res = http.get(fullUrl); + check(res, { + 'is status 200': (r) => r.status === 200, + }); + check(res, { + 'response status is success': (r) => { + try { + return JSON.parse(r.body).status === 'success'; + } catch (e) { + return false; + } + }, + }); +} From 48ce46a07f0b0f49969a6c6134acabc60af66fa8 Mon Sep 17 00:00:00 2001 From: Christopher Randles Date: Wed, 25 Feb 2026 22:53:35 -0500 Subject: [PATCH 2/2] Apply suggestion from @crandles Signed-off-by: Chris Randles --- hack/load-test/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/load-test/README.md b/hack/load-test/README.md index 18cc184a7..a24aea5c9 100644 --- a/hack/load-test/README.md +++ b/hack/load-test/README.md @@ -33,4 +33,4 @@ make run TRICKSTER_BASE_ENDPOINT=http://localhost:8480/myprom PROMQL_QUERY='up' ## Test scripts **basic.js** — Runs a PromQL instant query (controlled by `PROMQL_QUERY`) in a 30-second ramp-up -to 10 VUs. Passes if 95% of requests complete under 500 ms and >99% return a successful response. +to the configured number of VUs. Passes if 95% of requests complete under 500 ms and >99% return a successful response.