Quick Start
Connect to Prometheus
If Prometheus is already running locally:
grafatui --prometheus-url http://localhost:9090
Point Grafatui at another Prometheus server with the same option:
grafatui --prometheus-url http://prometheus.example.com:9090
Import a Grafana Dashboard
Grafatui imports either a Classic JSON dashboard or an exact
dashboard.grafana.app/v2 JSON resource that uses recursive grid, row, tab, or AutoGrid
containers:
grafatui --prometheus-url http://localhost:9090 --grafana-json ./dashboard.json
For V2 dashboards that use repeated rows or tabs, row/tab conditional rendering, or library panels, use the Classic export fallback: open Export as code → Advanced options, set Model to Classic, then download or copy the JSON. V2 resources can be imported as JSON or YAML; V1 Resource files are unsupported. See Grafana Dashboard Import for the full format requirements.
Override dashboard variables with repeated --var options:
grafatui --grafana-json ./dash.json --var job=node --var instance=server-01
Run the Demo
The repository includes a Prometheus demo stack and sample dashboards:
git clone https://github.com/fedexist/grafatui.git
cd grafatui
cd examples/demo && docker-compose up -d && sleep 5 && cd ../..
cargo run -- --grafana-json examples/dashboards/prometheus_demo.json --prometheus-url http://localhost:19090
When finished:
cd examples/demo
docker-compose down -v
Useful First Keys
| Key | Action |
|---|---|
q | Quit |
r | Force refresh |
+ / - | Zoom out / in |
[ / ] | Pan left / right |
f | Fullscreen selected panel |
Enter / Space on a row | Toggle the row |
Left / Right on a row | Collapse / expand the row |
v | Inspect values |
/ | Search visible rows and panels |
Try bounded AutoGrid tables with:
grafatui --grafana-json examples/dashboards/grafana_v2_autogrid_bounded.json \
--prometheus-url http://localhost:9090
Use Ctrl+Up/Ctrl+Down to scroll a selected capped table, and Ctrl+Home/
Ctrl+End to reach its first/last rows. Press f for fullscreen when a tiny
cap leaves no room for data. See keyboard and mouse controls.