• Querying Your Data
  • Visualization Tools
  • Grafana Integration

Grafana Integration

This page describes how to set up the Rockset Grafana connector.

#Introduction

Grafana is an open-source platform for analytics and monitoring. Using Grafana with Rockset is ideal for creating visualizations on your Rockset collections and plotting timeseries data.

#Configuration

  1. Create an API Key using the Rockset Console under Manage > API Keys.

Create New API Key

  1. Set up Grafana if you have not already. The Grafana website has detailed instructions here

  2. Use grafana-cli to install your plugin. You can download the Rockset plugin by following the instructions here.

  3. Because this is a backend plugin, it is required that the plugin is signed; however, the Grafana team hasn't implemented this yet. Thus, in the [plugins] section of your Grafana configuration file, you must add rockset-backend-datasource to the list of allow_loading_unsigned_plugins. You may also set the environment variable GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS to include rockset-backend-datasource for the plugin to be loaded.

[plugins]
allow_loading_unsigned_plugins = "rockset-backend-datasource"
  1. From your Grafana homepage, go to /datasources. You can type this in your browser, or click on the gear on the left side of the screen and click "Data Sources" under the configuration menu.

grafana_datasource_selection

  1. Type 'Rockset' into the search bar with placeholder text "Filter by name or type", and click on the Rockset data source.

grafana_add_datasource

  1. Enter your API key and name your connector, then press "Save & Test". If you get an authentication failure, ensure your API key was pasted correctly

grafana_enter_details

#Usage

  1. Click on the plus on the left side of the screen, and click on "Dashboard" under the create menu.

grafana_select_dashboard

  1. Click on "Add Query" in the new panel.

grafana_new_panel

  1. Select your Rockset data source next to the "Query" section of your panel view.

grafana_query_editor

  1. Enter your Rockset query into the text field. This query can be any SQL statement that is valid in the Rockset Console, but if you are using a graph visualization, you need a timeseries field. Let's use the query SELECT _event_time, COUNT(*) FROM _events GROUP BY _event_time LIMIT 100; where _event_time is a timeseries field.

grafana_full_query

  1. (Optional) Select which of your fields is the timeseries field in the "Timeseries field (optional)" text area. If you have only one field that is stored as a datetime string, the connector should parse it for you. Otherwise, you will need to specify which field you want to see. Let's try a query with two timeseries fields.

grafana_query_optional

  1. (Optional) Choose a visualization from the visualization tab on the left of the screen to format your data in different ways.

  2. You should now be able to see your results and save your panel!

grafana_results