Grafana panels, live from Basalt.
Add Basalt as a PostgreSQL data source. Panels query views over the Postgres wire protocol and refresh in under 50 ms.
Add Basalt as a PostgreSQL data source. Panels query views over the Postgres wire protocol and refresh in under 50 ms.
Basalt speaks the Postgres wire protocol, so Grafana's built-in PostgreSQL data source works as is. Time macros like $__timeFilter push down into the view, and results stream back from the nearest region.
Create a read-only role and copy the connection details into a new PostgreSQL data source. No plugin to install.
# create a read-only login for Grafana basalt connect grafana --role readonly
Write plain SQL over the source. Basalt keeps the view current with every record and tracks lineage back to the topic, partition and offset.
CREATE MATERIALIZED VIEW revenue_by_min AS SELECT date_trunc('minute', ts) AS minute, currency, sum(amount) AS revenue, count(*) AS payments FROM payments WHERE status = 'captured' GROUP BY 1, 2;
Every view is an endpoint the moment it exists. Call it over REST, connect with any Postgres client, or use the SDK from your app.
curl https://api.basalt.dev/v1/views/revenue_by_min?limit=5 \ -H "Authorization: Bearer $BASALT_TOKEN"
Uses Grafana's built-in PostgreSQL data source on Grafana Cloud or self-hosted.
$__timeFilter and $__timeGroup run inside the view, not after the scan.
Panels can refresh every second without loading your primary database.
Grafana alert rules run on the same queries, with no extra setup.