Skip to content

Instantly share code, notes, and snippets.

@kylebrandt
Created March 26, 2026 15:49
Show Gist options
  • Select an option

  • Save kylebrandt/fee628bb240a60d90c76fcde8780f107 to your computer and use it in GitHub Desktop.

Select an option

Save kylebrandt/fee628bb240a60d90c76fcde8780f107 to your computer and use it in GitHub Desktop.
dsabstraction_prom_initial
# kbrandt @ kbrandt-ws in ~/go/src/github.com/grafana/grafana/pkg/extensions/apps/dsabstraction on git:main o [11:48:11]
$ ./scripts/query_with_cookie.sh --stack-id 1 --query '{"query": "SELECT * FROM `prometheus::bfh6nkyxwj7cwf`.`up`", "from": "now-15s", "to": "now"}' | jq
Logging in to Grafana at http://localhost:3000...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 76 100 41 100 35 540 461 --:--:-- --:--:-- --:--:-- 1013
Querying dsabstraction at https://localhost:6457/apis/dsabstraction.grafana.app/v1alpha1/namespaces/stacks-1/query...
{
"schema": {
"name": "response",
"fields": [
{
"name": "timestamp",
"type": "time",
"typeInfo": {
"frame": "time.Time",
"nullable": true
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
}
},
{
"name": "instance",
"type": "string",
"typeInfo": {
"frame": "string",
"nullable": true
}
},
{
"name": "job",
"type": "string",
"typeInfo": {
"frame": "string",
"nullable": true
}
}
]
},
"data": {
"values": [
[
1774540081000,
1774540081000,
1774540081000,
1774540081000,
1774540081000,
1774540081000,
1774540081000,
1774540081000,
1774540082000,
1774540082000,
1774540082000,
1774540082000,
1774540082000,
1774540082000,
1774540082000,
1774540082000,
1774540083000,
1774540083000,
1774540083000,
1774540083000,
1774540083000,
1774540083000,
1774540083000,
1774540083000,
1774540084000,
1774540084000,
1774540084000,
1774540084000,
1774540084000,
1774540084000,
1774540084000,
1774540084000,
1774540085000,
1774540085000,
1774540085000,
1774540085000,
1774540085000,
1774540085000,
1774540085000,
1774540085000,
1774540086000,
1774540086000,
1774540086000,
1774540086000,
1774540086000,
1774540086000,
1774540086000,
1774540086000,
1774540087000,
1774540087000,
1774540087000,
1774540087000,
1774540087000,
1774540087000,
1774540087000,
1774540087000,
1774540088000,
1774540088000,
1774540088000,
1774540088000,
1774540088000,
1774540088000,
1774540088000,
1774540088000,
1774540089000,
1774540089000,
1774540089000,
1774540089000,
1774540089000,
1774540089000,
1774540089000,
1774540089000,
1774540090000,
1774540090000,
1774540090000,
1774540090000,
1774540090000,
1774540090000,
1774540090000,
1774540090000,
1774540091000,
1774540091000,
1774540091000,
1774540091000,
1774540091000,
1774540091000,
1774540091000,
1774540091000,
1774540092000,
1774540092000,
1774540092000,
1774540092000,
1774540092000,
1774540092000,
1774540092000,
1774540092000,
1774540093000,
1774540093000,
1774540093000,
1774540093000,
1774540093000,
1774540093000,
1774540093000,
1774540093000,
1774540094000,
1774540094000,
1774540094000,
1774540094000,
1774540094000,
1774540094000,
1774540094000,
1774540094000,
1774540095000,
1774540095000,
1774540095000,
1774540095000,
1774540095000,
1774540095000,
1774540095000,
1774540095000,
1774540096000,
1774540096000,
1774540096000,
1774540096000,
1774540096000,
1774540096000,
1774540096000,
1774540096000
],
[
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1
],
[
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112",
"fake-prometheus-data:9091",
"host.docker.internal:3000",
"localhost:9090",
"mysql-exporter:9104",
"node_exporter:9101",
"prometheus-high-card:9111",
"prometheus-random-data:8080",
"prometheus-utf8:9112"
],
[
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8",
"fake-data-gen",
"grafana",
"prometheus",
"mysql",
"node_exporter",
"prometheus-high-card",
"prometheus-random-data",
"prometheus-utf8"
]
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment