Skip to content

Commit

Permalink
repro dashboard for #648
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach committed Oct 24, 2024
1 parent 908fc8d commit 78edde3
Showing 1 changed file with 164 additions and 10 deletions.
174 changes: 164 additions & 10 deletions docker/grafana/dashboards/barchart_wrong_series.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
{
"annotations": {
"list": []
"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": 33,
"links": [],
"panels": [
{
"datasource": "clickhouse-x-auth",
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "PFA2E00E697AAEA0A"
},
"description": "https://github.com/Altinity/clickhouse-grafana/issues/648",
"fieldConfig": {
"defaults": {
"color": {
Expand All @@ -18,6 +39,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "bars",
"fillOpacity": 0,
"gradientMode": "none",
Expand Down Expand Up @@ -68,21 +90,149 @@
},
"id": 2,
"options": {
"graphStyle": "bar"
"graphStyle": "bar",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.3.0",
"targets": [
{
"query": "WITH\n --splitByChar('(', user_metadata_map['rp_prescreenStep'])[1] as prescreen,\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"rawQuery": true,
"refId": "A"
"add_metadata": true,
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "PFA2E00E697AAEA0A"
},
"editorMode": "builder",
"extrapolate": true,
"format": "time_series",
"formattedQuery": "WITH\n /* splitByChar('(', user_metadata_map['rp_prescreenStep'])[1] as prescreen, */\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"interval": "",
"intervalFactor": 1,
"query": "WITH\n splitByChar('(', user_metadata_map['rp_prescreenStep'])[1] as prescreen,\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"rawQuery": "/* grafana dashboard=barchart debug dashboard, user=0 */\nWITH\n splitByChar('(', user_metadata_map['rp_prescreenStep'])[1] as prescreen, */\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"refId": "A",
"round": "0s",
"skip_comments": true
}
],
"title": "reproduce AST parsing corner case",
"type": "timeseries"
},
{
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "PFA2E00E697AAEA0A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "bars",
"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": 9,
"w": 24,
"x": 0,
"y": 9
},
"id": 3,
"options": {
"graphStyle": "bar",
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.3.0",
"targets": [
{
"add_metadata": true,
"datasource": {
"type": "vertamedia-clickhouse-datasource",
"uid": "PFA2E00E697AAEA0A"
},
"editorMode": "builder",
"extrapolate": true,
"format": "time_series",
"formattedQuery": "WITH\n /* splitByChar('(', user_metadata_map['rp_prescreenStep'])[1] as prescreen, */\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"interval": "",
"intervalFactor": 1,
"query": "WITH\n /* splitByChar('|', user_metadata_map['rp_prescreenStep'])[1] as prescreen, */\n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"rawQuery": "/* grafana dashboard=barchart debug dashboard, user=0 */\nWITH\n \n user_metadata_map['rocketStage'] AS stage,\n stage AS keys\nSELECT\n (intDiv(toUInt32(_time), 3600) * 3600) * 1000 as t,\n keys,\n sum(alloc_cost) as cost\nFROM default.test_barchart\nWHERE\n cluster NOT LIKE '%-sleep'\n AND cluster NOT LIKE '%_test'\n AND hpcod_resource_name != 'INTERACTIVE'\nGROUP BY keys, t\nORDER BY keys, t",
"refId": "A",
"round": "0s",
"skip_comments": true
}
],
"title": "Time Series Panel",
"title": "workaround with ( replacing",
"type": "timeseries"
}
],
"schemaVersion": 30,
"style": "dark",
"preload": false,
"schemaVersion": 40,
"tags": [],
"templating": {
"list": []
Expand All @@ -91,6 +241,10 @@
"from": "now-1d",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "barchart debug dashboard",
"version": 20241023
"uid": "barchart-debug-dashboard",
"version": 20241024,
"weekStart": ""
}

0 comments on commit 78edde3

Please sign in to comment.