This plugin allows users to present data from the Tezos chain using only a Tezos node. It does not depend on any external indexers. The plugin allows users to write expressions using the Cuelang language.
Prerequiste: a functioning docker installation, the jq command line tool, and a Tezos RPC node
The fastest way to install and run the plugin is to use the official Grafana docker image as follows:
docker run -it \
-p 3000:3000 \
--name=tezos-grafana \
-e "GF_INSTALL_PLUGINS=$(curl -sH "Accept: application/vnd.github.v3+json" https://api.github.com/repos/ecadlabs/tezos-grafana-datasource/releases | jq -r '[.[] | select(.draft == false and .prerelease == false)][0].assets[0].browser_download_url');ecad-labs-tezos-datasource" \
-e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=ecad-labs-tezos-datasource" \
grafana/grafana:latest
- Navigate to http://localhost:3000/ and login to your Grafana instance using username:
admin
and password:admin
. - In the Grafana web interface, go "Configuration" -> "Data Sources"
- Click the "Add data source" button
- Either enter "tezos" in the search bar, or scroll to the bottom of the list
- When hovering your cursor over the "tezos-datasource" plugin entry, click the "Select" button.
- Name the Data Source entry appropriatley. Example "tezos-datasource mainnet" is sensible if you are using a mainnet node
- Enter the http URL of the RPC node you want to use.
- Specify
main
in the "Chain" input box. - Click "Save & Test"
- In Grafana, click "Import" From the "Create" menu (shows as a + symbol when the left menu is collapsed).
- In the "Import via grafana.com" text field type the number
15174
or the full URLhttps://grafana.com/grafana/dashboards/15174
, click "Load". - On the next screen, select the data-source you created in the previous step.
- Click "Import"
- You should have a new dashboard.
The plugin uses Cuelang for its query syntax.
Queries should appear between square brackets [...]
, and ther first element is typically a time value.
Example queries are:
[block.header.timestamp, block.statistics.n_ops.endorsement]
[block.header.timestamp, block.statistics.n_ops_total]
[block.header.timestamp, block.delay / block.minimal_delay]
Multiple items can be added to a single query. The following example shows
[
block.header.timestamp,
block.statistics.n_ops.endorsement,
block.statistics.n_ops.reveal,
block.statistics.n_ops.transaction,
block.statistics.n_ops.origination,
block.statistics.n_ops.delegation
]
The Tezos Grafana Plugin must query blocks from the node. It caches data as it goes, but the plugin will take a long time for longer time spans as querying many blocks from a Tezos node is a slow process. Narrow your time range to smaller units for best results, such as 15 minutes or 3 hours.
--