Last active
September 19, 2025 14:52
-
-
Save kylebrandt/16b044a84601316eece70f1d6e9ccc95 to your computer and use it in GitHub Desktop.
Revisions
-
kylebrandt revised this gist
Sep 19, 2025 . 2 changed files with 15 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,14 @@ HTTP/1.1 200 OK Audit-Id: 5b82aaf1-4ba7-48bc-bb7b-94a7b89c6c5e Cache-Control: no-store Content-Type: application/json X-Content-Type-Options: nosniff X-Frame-Options: deny X-Xss-Protection: 1; mode=block Date: Fri, 19 Sep 2025 14:51:41 GMT Content-Length: 902 Connection: close { "kind": "SQLSchemas", "apiVersion": "query.grafana.app/v0alpha1", @@ -42,38 +53,9 @@ ] }, "dog": { "columns": null, "sampleRows": null, "error": "[sse.dataQueryError] failed to execute query [dog]: invalid query type. aframes_builder" }, "fox": { "columns": [ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -181,7 +181,7 @@ content-type: application/json ], "generatorSource": "frontend", "hide": true, "queryType": "aframes_builder", "rawFrameSource": "staticScenario", "refId": "dog", "resultState": "success", -
kylebrandt revised this gist
Sep 19, 2025 . 2 changed files with 36 additions and 18 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ### Req POST http://admin:admin@localhost:3000/apis/query.grafana.app/v0alpha1/namespaces/default/sqlschemas?ds_type=__expr__&expression=true content-type: application/json { @@ -133,7 +133,7 @@ content-type: application/json ], "generatorSource": "frontend", "hide": true, "queryType": "frames_builder", "rawFrameSource": "staticScenario", "refId": "fox", "resultState": "success", This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,7 @@ { "kind": "SQLSchemas", "apiVersion": "query.grafana.app/v0alpha1", "sqlSchemas": { "cat": { "columns": [ { @@ -87,9 +76,38 @@ Connection: close ] }, "fox": { "columns": [ { "name": "__metric_name__", "mysqlType": "text", "nullable": false, "dataFrameFieldType": "string" }, { "name": "__value__", "mysqlType": "double", "nullable": true, "dataFrameFieldType": "*float64" }, { "name": "host", "mysqlType": "text", "nullable": true, "dataFrameFieldType": "*string" } ], "sampleRows": [ [ "cpu", 3.14, "a" ], [ "cpu", 93.14, "c" ] ] } } } -
kylebrandt revised this gist
Sep 18, 2025 . 1 changed file with 11 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,14 @@ HTTP/1.1 200 OK Audit-Id: 5cd78be6-d3df-4510-88b2-11b0c2035e4b Cache-Control: no-store Content-Type: application/json X-Content-Type-Options: nosniff X-Frame-Options: deny X-Xss-Protection: 1; mode=block Date: Thu, 18 Sep 2025 15:19:14 GMT Content-Length: 908 Connection: close { "kind": "SQLSchemaResponse", "apiVersion": "query.grafana.app/v0alpha1", @@ -24,9 +35,6 @@ } ], "sampleRows": [ [ "cpu", 3.14, @@ -66,8 +74,6 @@ } ], "sampleRows": [ [ "cpu", 3.14, -
kylebrandt revised this gist
Sep 18, 2025 . 1 changed file with 6 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,6 +24,9 @@ } ], "sampleRows": [ null, null, null, [ "cpu", 3.14, @@ -38,31 +41,6 @@ "cpu", 3, "x" ] ] }, @@ -88,6 +66,8 @@ } ], "sampleRows": [ null, null, [ "cpu", 3.14, @@ -106,4 +86,4 @@ "error": "[sse.dataQueryError] failed to execute query [fox]: invalid query type. aframes_builder" } } } -
kylebrandt revised this gist
Sep 18, 2025 . 2 changed files with 106 additions and 74 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -133,7 +133,7 @@ content-type: application/json ], "generatorSource": "frontend", "hide": true, "queryType": "aframes_builder", "rawFrameSource": "staticScenario", "refId": "fox", "resultState": "success", This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,77 +1,109 @@ { "kind": "SQLSchemaResponse", "apiVersion": "query.grafana.app/v0alpha1", "SQLSchema": { "cat": { "columns": [ { "name": "__metric_name__", "mysqlType": "text", "nullable": false, "dataFrameFieldType": "string" }, { "name": "__value__", "mysqlType": "double", "nullable": true, "dataFrameFieldType": "*float64" }, { "name": "host", "mysqlType": "text", "nullable": true, "dataFrameFieldType": "*string" } ], "sampleRows": [ [ "cpu", 3.14, "a" ], [ "cpu", 93.14, "b" ], [ "cpu", 3, "x" ], [ "cpu", 2, "y" ], [ "cpu", 4, "z" ], [ "cpu", 1, "u" ], [ "cpu", 2, "v" ], [ "cpu", 3, "w" ] ] }, "dog": { "columns": [ { "name": "__metric_name__", "mysqlType": "text", "nullable": false, "dataFrameFieldType": "string" }, { "name": "__value__", "mysqlType": "double", "nullable": true, "dataFrameFieldType": "*float64" }, { "name": "host", "mysqlType": "text", "nullable": true, "dataFrameFieldType": "*string" } ], "sampleRows": [ [ "cpu", 3.14, "a" ], [ "cpu", 93.14, "e" ] ] }, "fox": { "columns": null, "sampleRows": null, "error": "[sse.dataQueryError] failed to execute query [fox]: invalid query type. aframes_builder" } } } -
kylebrandt created this gist
Sep 16, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,208 @@ ### Req POST http://admin:admin@localhost:3000/apis/query.grafana.app/v0alpha1/namespaces/default/sqlschema?ds_type=__expr__&expression=true content-type: application/json { "queries": [ { "datasource": { "uid": "9c3MNrV4k", "type": "grafana-mock-datasource" }, "frames": [ { "count": 1, "disabled": false, "fields": [ { "disabled": false, "labels": "host=a", "name": "cpu", "type": "nullable-float64", "value": "3.14" }, { "disabled": false, "labels": "host=b", "name": "cpu", "type": "nullable-float64", "value": "93.14" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "3", "labels": "host=x" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "2", "labels": "host=y" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "4", "labels": "host=z" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "1", "labels": "host=u" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "2", "labels": "host=v" }, { "name": "cpu", "type": "float64", "disabled": false, "value": "3", "labels": "host=w" } ], "frameInputType": "numeric-wide", "meta": { "type": "numeric-wide", "typeVersion": [ 0, 1 ] }, "name": "New Frame", "source": "count" } ], "generatorSource": "frontend", "hide": true, "queryType": "frames_builder", "rawFrameSource": "staticScenario", "refId": "cat", "resultState": "success", "scenario": "no-data", "datasourceId": 49, "intervalMs": 20000, "maxDataPoints": 1003 }, { "datasource": { "uid": "9c3MNrV4k", "type": "grafana-mock-datasource" }, "frames": [ { "count": 1, "disabled": false, "fields": [ { "disabled": false, "labels": "host=a", "name": "cpu", "type": "nullable-float64", "value": "3.14" }, { "disabled": false, "labels": "host=c", "name": "cpu", "type": "float64", "value": "93.14" } ], "frameInputType": "numeric-wide", "meta": { "type": "numeric-wide", "typeVersion": [ 0, 1 ] }, "name": "New Frame", "source": "count" } ], "generatorSource": "frontend", "hide": true, "queryType": "frames_builder", "rawFrameSource": "staticScenario", "refId": "fox", "resultState": "success", "scenario": "no-data", "datasourceId": 49, "intervalMs": 20000, "maxDataPoints": 1003 }, { "datasource": { "uid": "9c3MNrV4k", "type": "grafana-mock-datasource" }, "frames": [ { "count": 1, "disabled": false, "fields": [ { "disabled": false, "labels": "host=a", "name": "cpu", "type": "nullable-float64", "value": "3.14" }, { "disabled": false, "labels": "host=e", "name": "cpu", "type": "nullable-float64", "value": "93.14" } ], "frameInputType": "numeric-wide", "meta": { "type": "numeric-wide", "typeVersion": [ 0, 1 ] }, "name": "New Frame", "source": "count" } ], "generatorSource": "frontend", "hide": true, "queryType": "frames_builder", "rawFrameSource": "staticScenario", "refId": "dog", "resultState": "success", "scenario": "no-data", "datasourceId": 49, "intervalMs": 20000, "maxDataPoints": 1003 }, { "datasource": { "type": "__expr__", "uid": "__expr__", "name": "Expression" }, "expression": "$cat + $fox + $dog", "hide": false, "refId": "C", "type": "math", "window": "" } ], "from": "1690967121711", "to": "1690988721711" } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,77 @@ HTTP/1.1 200 OK Audit-Id: 2a1afb05-0d45-4485-9907-67fa854a51e7 Cache-Control: no-store Content-Type: application/json X-Content-Type-Options: nosniff X-Frame-Options: deny X-Xss-Protection: 1; mode=block Date: Tue, 16 Sep 2025 15:09:44 GMT Content-Length: 912 Connection: close { "kind": "SQLSchemaResponse", "apiVersion": "query.grafana.app/v0alpha1", "SQLSchemaResponse": { "cat": [ { "Name": "__metric_name__", "MySQLType": "text", "Nullable": false, "DataFrameFieldType": "string" }, { "Name": "__value__", "MySQLType": "double", "Nullable": true, "DataFrameFieldType": "*float64" }, { "Name": "host", "MySQLType": "text", "Nullable": true, "DataFrameFieldType": "*string" } ], "dog": [ { "Name": "__metric_name__", "MySQLType": "text", "Nullable": false, "DataFrameFieldType": "string" }, { "Name": "__value__", "MySQLType": "double", "Nullable": true, "DataFrameFieldType": "*float64" }, { "Name": "host", "MySQLType": "text", "Nullable": true, "DataFrameFieldType": "*string" } ], "fox": [ { "Name": "__metric_name__", "MySQLType": "text", "Nullable": false, "DataFrameFieldType": "string" }, { "Name": "__value__", "MySQLType": "double", "Nullable": true, "DataFrameFieldType": "*float64" }, { "Name": "host", "MySQLType": "text", "Nullable": true, "DataFrameFieldType": "*string" } ] } }