briqbriq
Dashboard

cookbook / grafana

Grafana

A dashboard the agent can point at its own data, instead of a STATUS.md it writes by hand.

Run it

briq_run({
  recipe: "grafana",
  params: {
    "size": "nano"
  },
  wait: true
})

Parameters

NameTypeOptionsDefault
sizeenumnano, small, medium"nano"

Outputs

Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

GRAFANA_URL
http://grafana.<stack>.internal:3000
GRAFANA_ADMIN_USER
admin
GRAFANA_ADMIN_PASSWORD
<GRAFANA_ADMIN_PASSWORD>

What it runs

BriqImagePortsSizeVolume
grafanagrafana/grafana:latest3000nano5 GB at /var/lib/grafana

When to use it

  • The agent keeps writing a STATUS.md or METRICS.md by hand after a load test or a long run, and you would rather look at a chart than a paragraph of numbers.
  • You want a dashboard you can point at data the agent's own briqs are already producing — Postgres query stats, a Prometheus endpoint a service exposes, logs — instead of a snapshot frozen into a file.
  • You want to hand a teammate a link to a live dashboard, not a note that goes stale the moment the agent stops updating it.

The volume is 5 GB, mounted at /var/lib/grafana, so a stopped briq keeps its dashboards and data source configuration.

Tips

  • Add data sources through the API, not the UI, so the agent can wire it up itself: POST /api/datasources against GRAFANA_URL with basic auth from GRAFANA_ADMIN_USER and GRAFANA_ADMIN_PASSWORD.
  • Point it at another briq in the stack. A Postgres or Prometheus-compatible service in the same run is reachable at its internal host; Grafana does not need its data source exposed publicly, only itself.
  • Provision dashboards as JSON. POST /api/dashboards/db with a dashboard model is faster and more repeatable than building panels by hand for something the agent generates each run.
  • Share the view, not a screenshot. briq_expose port 3000 with mode: "token" and hand the URL to whoever asked for the status update.