5 changed files with 1852 additions and 5 deletions
File diff suppressed because it is too large
@ -0,0 +1,345 @@ |
|||
{ |
|||
"annotations": { |
|||
"list": [ |
|||
{ |
|||
"builtIn": 1, |
|||
"datasource": { |
|||
"type": "grafana", |
|||
"uid": "-- Grafana --" |
|||
}, |
|||
"enable": true, |
|||
"hide": true, |
|||
"iconColor": "rgba(0, 211, 255, 1)", |
|||
"name": "Annotations & Alerts", |
|||
"type": "dashboard" |
|||
} |
|||
] |
|||
}, |
|||
"editable": true, |
|||
"fiscalYearStartMonth": 0, |
|||
"graphTooltip": 0, |
|||
"id": 3, |
|||
"links": [], |
|||
"panels": [ |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 1, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 6, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 0 |
|||
}, |
|||
"id": 1, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"exemplar": false, |
|||
"expr": "opencodequest_leaderboard_hero:prod{user=\"catwoman\"}", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "{{user}}", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "opencodequest_leaderboard_hero:prod => Exercise completion state", |
|||
"type": "timeseries" |
|||
}, |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 80, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 10, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 6 |
|||
}, |
|||
"id": 4, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"expr": "(increase(opencodequest_leaderboard_hero:prod[10s]) >= bool 0.5)\n*\n(\n 55\n +\n sum(\n (\n 1728651786 + 55\n -\n timestamp(\n label_replace(up{instance=\"localhost:9090\"}, \"user\", \"catwoman\", \"\",\"\")\n )\n ) / 5\n ) by (user)\n)\n", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "__auto", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "opencodequest_leaderboard_hero_onetime_bonus:prod => Time bonus for the user", |
|||
"type": "timeseries" |
|||
}, |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 80, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 10, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 16 |
|||
}, |
|||
"id": 3, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"expr": "sum_over_time(opencodequest_leaderboard_hero_onetime_bonus:prod{user=\"catwoman\"}[1h])", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "__auto", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "opencodequest_leaderboard_hero_lifetime_bonus:prod => Time bonus for the user (carry forward)", |
|||
"type": "timeseries" |
|||
} |
|||
], |
|||
"refresh": "", |
|||
"schemaVersion": 39, |
|||
"tags": [], |
|||
"templating": { |
|||
"list": [] |
|||
}, |
|||
"time": { |
|||
"from": "2024-10-11T13:03:20.000Z", |
|||
"to": "2024-10-11T13:06:20.000Z" |
|||
}, |
|||
"timepicker": {}, |
|||
"timezone": "browser", |
|||
"title": "Time Bonus (carry forward)", |
|||
"uid": "fe0juqdi9f3eoc", |
|||
"version": 9, |
|||
"weekStart": "" |
|||
} |
|||
@ -0,0 +1,445 @@ |
|||
{ |
|||
"annotations": { |
|||
"list": [ |
|||
{ |
|||
"builtIn": 1, |
|||
"datasource": { |
|||
"type": "grafana", |
|||
"uid": "-- Grafana --" |
|||
}, |
|||
"enable": true, |
|||
"hide": true, |
|||
"iconColor": "rgba(0, 211, 255, 1)", |
|||
"name": "Annotations & Alerts", |
|||
"type": "dashboard" |
|||
} |
|||
] |
|||
}, |
|||
"editable": true, |
|||
"fiscalYearStartMonth": 0, |
|||
"graphTooltip": 0, |
|||
"id": 4, |
|||
"links": [], |
|||
"panels": [ |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 1, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 6, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 0 |
|||
}, |
|||
"id": 1, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"exemplar": false, |
|||
"expr": "opencodequest_leaderboard_hero:prod{user=\"catwoman\"}", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "{{user}}", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "opencodequest_leaderboard_hero:prod => Exercise completion state", |
|||
"type": "timeseries" |
|||
}, |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 1, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 6, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 6 |
|||
}, |
|||
"id": 2, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"expr": "increase(opencodequest_leaderboard_hero:prod{user=\"catwoman\"}[10s]) >= bool 0.5", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "{{user}}", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "increase(opencodequest_leaderboard_hero:prod[10s]) >= bool 0.5 => Change of exercise completion stage", |
|||
"type": "timeseries" |
|||
}, |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 80, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 10, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 12 |
|||
}, |
|||
"id": 3, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"expr": "55\n+\nsum(\n (\n 1728651786 + 55\n -\n timestamp(\n label_replace(up{instance=\"localhost:9090\"}, \"user\", \"catwoman\", \"\",\"\")\n )\n ) / 5\n ) by (user)\n", |
|||
"instant": false, |
|||
"legendFormat": "__auto", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "55 + sum(($TS - timestamp(...) / 5) by (user) => Evolution of the time bonus over time", |
|||
"type": "timeseries" |
|||
}, |
|||
{ |
|||
"datasource": { |
|||
"default": true, |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"fieldConfig": { |
|||
"defaults": { |
|||
"color": { |
|||
"fixedColor": "blue", |
|||
"mode": "fixed" |
|||
}, |
|||
"custom": { |
|||
"axisBorderShow": false, |
|||
"axisCenteredZero": false, |
|||
"axisColorMode": "text", |
|||
"axisLabel": "", |
|||
"axisPlacement": "auto", |
|||
"axisSoftMax": 80, |
|||
"axisSoftMin": 0, |
|||
"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", |
|||
"value": null |
|||
}, |
|||
{ |
|||
"color": "red", |
|||
"value": 80 |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
"overrides": [] |
|||
}, |
|||
"gridPos": { |
|||
"h": 10, |
|||
"w": 16, |
|||
"x": 0, |
|||
"y": 22 |
|||
}, |
|||
"id": 4, |
|||
"options": { |
|||
"legend": { |
|||
"calcs": [], |
|||
"displayMode": "list", |
|||
"placement": "bottom", |
|||
"showLegend": true |
|||
}, |
|||
"tooltip": { |
|||
"mode": "single", |
|||
"sort": "none" |
|||
} |
|||
}, |
|||
"targets": [ |
|||
{ |
|||
"datasource": { |
|||
"type": "prometheus", |
|||
"uid": "be0j8k9s522v4b" |
|||
}, |
|||
"editorMode": "code", |
|||
"expr": "(increase(opencodequest_leaderboard_hero:prod[10s]) >= bool 0.5)\n*\n(\n 55\n +\n sum(\n (\n 1728651786 + 55\n -\n timestamp(\n label_replace(up{instance=\"localhost:9090\"}, \"user\", \"catwoman\", \"\",\"\")\n )\n ) / 5\n ) by (user)\n)\n", |
|||
"instant": false, |
|||
"interval": "5s", |
|||
"legendFormat": "__auto", |
|||
"range": true, |
|||
"refId": "A" |
|||
} |
|||
], |
|||
"title": "opencodequest_leaderboard_hero_onetime_bonus:prod => Time bonus for the user", |
|||
"type": "timeseries" |
|||
} |
|||
], |
|||
"refresh": "", |
|||
"schemaVersion": 39, |
|||
"tags": [], |
|||
"templating": { |
|||
"list": [] |
|||
}, |
|||
"time": { |
|||
"from": "2024-10-11T13:03:20.000Z", |
|||
"to": "2024-10-11T13:06:20.000Z" |
|||
}, |
|||
"timepicker": {}, |
|||
"timezone": "browser", |
|||
"title": "Time Bonus", |
|||
"uid": "51b77993344ca55e", |
|||
"version": 1, |
|||
"weekStart": "" |
|||
} |
|||
Loading…
Reference in new issue