# Grafana

Create custom dashboards and visualisations using the Spice.xyz data source plugin for Grafana. This plugin can be found in [Grafana plugins catalog](https://grafana.com/grafana/plugins/spiceai-spicexyz-datasource/), and is also available on [GitHub](https://github.com/spiceai/grafana-spice.xyz-datasource/).

## Installation

For more information, visit the docs on [plugin installation](https://grafana.com/docs/grafana/latest/plugins/installation/).

### Installing using Grafana CLI

```
grafana-cli plugins install
```

### Installing with Docker

Set `GF_INSTALL_PLUGINS` env variable, to include the plugin.

```
GF_INSTALL_PLUGINS="spiceai-spicexyz-datasource"
```

## Configuration

After installing a plugin, go to connections -> your connections -> data sources, and search for Spice.xyz.

Set API Key from your Spice.xyz application and click **Save & test**:

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2FJhuLBl6WRDHCXaL9FtDd%2FCleanShot%202023-07-18%20at%2016.04.58%402x.png?alt=media&#x26;token=204ccf99-9e58-4239-8952-362edc4b183e" alt=""><figcaption></figcaption></figure>

## Creating visualisations

Create new Grafana panel and select `Spice.xyz` data source, edit the query and configure visualisation.

<figure><img src="https://692214342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc71sWdWMqp1e_rsTZE-129938315%2Fuploads%2F3NudIEsBCsPedxwkKDoP%2FCleanShot%202023-07-18%20at%2016.08.00%402x.png?alt=media&#x26;token=b541d475-f4ad-445d-b999-a34c208685e9" alt=""><figcaption></figcaption></figure>

Visit [Grafana Docs](https://grafana.com/docs/grafana/latest/panels-visualizations/) for more information about panels visualisations, and also check spice queries examples for reference:

[example-ethereum-sql-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-ethereum-sql-queries "mention")

[example-ethereum-beacon-sql-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-ethereum-beacon-sql-queries "mention")

[example-dex-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-dex-queries "mention")

[example-bitcoin-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-bitcoin-queries "mention")

[example-flow-sql-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-flow-sql-queries "mention")

[example-cross-chain-queries](https://docs.spice.ai/~/changes/fl1GUvkHE2461izfYRLa/data-tables/sql-query-examples/example-cross-chain-queries "mention")
