Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Grafatui can be configured with CLI options, a TOML configuration file, or both. CLI options override values from the configuration file.

Common CLI Options

OptionDescriptionDefault
--prometheus-url <URL>Prometheus server URLhttp://localhost:9090
--grafana-json <FILE>Grafana dashboard JSON filenone
--validateCheck the Grafana dashboard import and exit without starting the TUIfalse
--strictMake --validate fail when diagnostics contain warningsfalse
--format <FORMAT>Output format for --validate: text or jsontext
--range <DURATION>Time range window, such as 5m, 1h, or 24h5m
--step <DURATION>Query step resolution, such as 5s or 30s5s
--var <KEY=VALUE>Override a dashboard variablenone
--theme <NAME>UI themedefault
--threshold-marker <MARKER>Marker for threshold linesdashed
--autogrid-color <COLOR>Color for automatic graph grid lines and labelsdark-gray
--export-dir <DIR>Directory for exports and recordings./grafatui-exports
--export-format <FORMAT>svg, png, or bothsvg
--record-max-frames <COUNT>Maximum changed frames per recording300
--refresh-rate <MS>Data fetch interval in milliseconds1000
--config <FILE>Configuration file pathnone

Run the full help output with:

grafatui --help

Configuration File

Create grafatui.toml in ~/.config/grafatui/, or pass a custom path with --config.

prometheus_url = "http://localhost:9090"
refresh_rate = 1000
time_range = "1h"
step = "5s"
theme = "dracula"
threshold_marker = "dashed"
export_dir = "./grafatui-exports"
export_format = "svg"
record_max_frames = 300
autogrid = true
autogrid_color = "dark-gray"
grafana_json = "~/.config/grafatui/my-dashboard.json"

[vars]
job = "node"
instance = "server-01"

Themes

Built-in themes include:

  • default
  • dracula
  • monokai
  • solarized-dark
  • solarized-light
  • gruvbox
  • tokyo-night
  • catppuccin

Use a theme from the CLI:

grafatui --theme tokyo-night