Documentation Index
Fetch the complete documentation index at: https://docs.chartcastr.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use Grafana as a data source for Chartcastr. Connect your Grafana host (self-hosted or Grafana Cloud) with a service-account token and Chartcastr will execute queries against your existing datasources — Prometheus, Loki, MySQL, Postgres, InfluxDB, and more — and chart the result. Each Chartcastr source can pulse up to two metrics rendered as a line or bar chart. When two metrics have very different scales (say request rate at 5,000/s and error percentage at 0–5%), flip on the split Y-axis option to keep both legible.Grafana metrics are user-defined — there is no preset metric list like Plausible or PostHog. You supply the query expression that Grafana itself would run.
Setup
Create a service account
- Grafana Cloud
- Self-hosted Grafana
In your Grafana Cloud stack, go to Administration → Users and access → Service accounts. You can find it quickly by pressing 
Click Add service account, give it a name (e.g. 
Cmd+K (or Ctrl+K) and searching for “service”.
chartcastr-integration), and set the role to Viewer. Viewer access is all Chartcastr needs — it only reads metric data.
Generate a service account token
Click into the service account you just created, then click Add service account token.
Give the token a display name and set an expiration date. We recommend 1 year — long enough to avoid frequent rotation, short enough to limit exposure if the token is ever compromised. Copy the generated

glsa_... token; you won’t be able to view it again.Connect in Chartcastr
In Chartcastr, go to New Source and select Grafana. Enter:
- Grafana host — the full URL of your Grafana instance
- Grafana Cloud
- Self-hosted Grafana
Your Grafana Cloud URL looks like
https://yourorg.grafana.net. Find it in the Grafana Cloud portal under your stack details.- Service account token — the
glsa_...token from the previous step
Pick a datasource
Chartcastr loads the list of datasources available to your service account. Pick the one your metric lives in (Prometheus, Loki, your SQL database, etc.).
Enter a query
Paste the query expression for your metric — PromQL for Prometheus, LogQL for Loki, raw SQL for SQL datasources. Add an optional label to use in the legend.Example PromQL:Example LogQL:
(Optional) Add a second metric
Click Add second metric to overlay a second series on the same chart. If the two metrics have very different ranges, enable Split Y-axis so each gets its own scale.
Pick chart type + window
Choose Line or Bar, then pick how far back to look (1 hour, 6 hours, 24 hours, 7 days, or 30 days).
Supported datasource types
Chartcastr’s Grafana integration runs queries via Grafana’s/api/ds/query endpoint, which supports any datasource installed in your Grafana — including:
- Prometheus (PromQL)
- Loki (LogQL)
- MySQL / Postgres / MSSQL (SQL)
- InfluxDB (InfluxQL / Flux)
- ClickHouse
- Any community datasource plugin that accepts a
queryfield
Notes
- Only integer metrics: values are rounded to integers. This is fine for counts and rates but means decimal-precision metrics (e.g. 0.823 ratios) will lose precision.
- Time-series only: queries must return a time-series shape. Single-value (instant) queries are not yet supported.
- Service-account token is encrypted: stored AES-256-GCM-encrypted at rest, never exposed back to the client.
- Self-hosted reachability: Chartcastr’s servers must be able to reach your Grafana host over HTTPS. If your Grafana is behind a private network or VPN, use Grafana Cloud or expose it via a reverse proxy with a valid TLS certificate.

