From eb6b12e7f2c5051e12bca26852534b81f100888b Mon Sep 17 00:00:00 2001 From: lspgn Date: Fri, 1 Dec 2023 01:08:53 -0800 Subject: [PATCH 1/2] compose: fix kcg dashboard query --- compose/kcg/grafana/dashboards/viz-ch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/kcg/grafana/dashboards/viz-ch.json b/compose/kcg/grafana/dashboards/viz-ch.json index f2b78f73..f964dcaa 100644 --- a/compose/kcg/grafana/dashboards/viz-ch.json +++ b/compose/kcg/grafana/dashboards/viz-ch.json @@ -77,7 +77,7 @@ "group": [], "intervalFactor": 1, "metricColumn": "none", - "query": "SELECT\n t,\n sum(sumbytes) AS sumbytes\nFROM (\n SELECT\n $timeSeries AS t,\n sum(bytes*sampling_rate) as sumbytes\n FROM $table\n WHERE $timeFilter\n GROUP BY t\n\n UNION ALL\n\n SELECT\n intDiv($from+number*$interval, $interval)*$interval*1000 AS t,\n 0 AS sumbytes\n FROM numbers(intDiv($to-$from, $interval))\n)\nGROUP BY t\nORDER BY t", "refId": "A", + "query": "SELECT\n t,\n sum(sumbytes) AS sumbytes\nFROM (\n SELECT\n $timeSeries AS t,\n sum(bytes*sampling_rate) as sumbytes\n FROM $table\n WHERE $timeFilter\n GROUP BY t\n\n UNION ALL\n\n SELECT\n toInt64(intDiv($from+number*$interval, $interval)*$interval*1000) AS t,\n 0 AS sumbytes\n FROM numbers(intDiv($to-$from, $interval))\n)\nGROUP BY t\nORDER BY t", "round": "0s", "select": [ [ From aee1f06e6e849ceb079a07014b32cb8a4914569d Mon Sep 17 00:00:00 2001 From: lspgn Date: Fri, 1 Dec 2023 01:10:59 -0800 Subject: [PATCH 2/2] nit --- compose/kcg/grafana/dashboards/viz-ch.json | 1 + 1 file changed, 1 insertion(+) diff --git a/compose/kcg/grafana/dashboards/viz-ch.json b/compose/kcg/grafana/dashboards/viz-ch.json index f964dcaa..0cc0af2e 100644 --- a/compose/kcg/grafana/dashboards/viz-ch.json +++ b/compose/kcg/grafana/dashboards/viz-ch.json @@ -78,6 +78,7 @@ "intervalFactor": 1, "metricColumn": "none", "query": "SELECT\n t,\n sum(sumbytes) AS sumbytes\nFROM (\n SELECT\n $timeSeries AS t,\n sum(bytes*sampling_rate) as sumbytes\n FROM $table\n WHERE $timeFilter\n GROUP BY t\n\n UNION ALL\n\n SELECT\n toInt64(intDiv($from+number*$interval, $interval)*$interval*1000) AS t,\n 0 AS sumbytes\n FROM numbers(intDiv($to-$from, $interval))\n)\nGROUP BY t\nORDER BY t", + "refId": "A", "round": "0s", "select": [ [