Cookbook recipes to get up and running with Spice.ai quickly 🚀
Works with v1.0+
This recipe will show how to configure a Grafana dashboard to use Spice as the data source using the Infinity (opens in a new tab) plugin.
This recipe requires Docker (opens in a new tab) and Docker Compose (opens in a new tab) to be installed.
Install spice (opens in a new tab) locally so you can run the Spice runtime on your machine.
Clone the spiceai/cookbook repository and navigate to the grafana-datasource directory:
In one terminal, run the Spice runtime locally from this directory:
Spice will load the datasets defined in spicepod.yaml and listen on localhost:8090.
Open a second terminal and run the following command to start Grafana in Docker:
make
Open Grafana in your browser at http://localhost:3000 (opens in a new tab).
Log in with the default credentials admin/admin, skip the password change prompt.

Navigate to Administation -> Plugins and data -> Plugins.
Select "State: All", and search for "Infinity". Install and click on "Add new data source".

Leave the default values and click on "Save & Test".

Click on "Build a dashboard" and add a new visualization. Select "Infinity" from the list of data sources.
Change "Method" to "POST" and "URL" to http://localhost:8090/v1/sql.
Add SQL query in body, using "Raw" mode:
Add the header Accept: application/json as well.
Set visualization to Table

Press Ctrl+C in the terminal running spice run to stop the Spice runtime.
To stop and remove the Docker containers/volumes that were created, run:
make clean