Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Looker data source plugin for Grafana
The Looker data source plugin for Grafana allows you to visualize data from Looker in Grafana.
Note: This plugin is in public preview. Refer Grafana Labs release life cycle documentation for further details. If you notice any issues or having feature request, create a support ticket with your Grafana Enterprise support channel.
- Valid Grafana Enterprise License. Visit Grafana pricing for more details
- Valid Looker account and API credentials. Visit Looker docs for more details
Getting Looker API credentials
In order to connect Grafana Looker data source instance with Looker, you need details about your Looker environment and credentials. You can generate the Looker API credentials (
client_secret) by following the guidelines specified in the Looker documentation.
Typically the workflow wil be, Looker -> Admin -> User -> Select user -> Edit keys (API keys) -> New API key
Configure the data source in Grafana
Add a Looker data source by filling the following information.
|Looker URL||Looker instance base URL|
|Looker Client ID||Looker client ID|
|Looker Client Secret||Looker client secret|
More details about data source configuration can be found here.
Configure the Looker data source with provisioning
It is possible to configure data sources using configuration files with Grafana’s provisioning system. To learn more, read about how it works and about all the settings for data sources at Provisioning Grafana.
apiVersion: 1 datasources: - name: Looker Prod type: grafana-looker-datasource jsonData: base_url: https://00001234-1234-1ab2-1234-a1b2c3d4.looker.app client_id: 1234abcdXyZ567 secureJsonData: client_secret: EAiHBw4ngGLQidMtWeH4U8cE1
More details about provisioning data sources can be found here
With Looker data source for Grafana, you can query Looker in following ways. These are referred as Query Type in the looker data source query editor.
You can execute a LookML Query via the LookML query type. You have a option to build a basic LookML query json via the builder, or you can enter the advanced raw LookML JSON. Under the hood, the data source uses the Looker RunInlineQuery API.
|Model||LookML model name|
|Explore Name||LookML view name|
|Dimensions & Measures||LookML fields. Supports dimensions and measures|
|Pivots||LookML pivot fields.|
|Custom measures||Custom measures on fields|
|Filter Expression||Custom filter expression|
Instead building a new LookML Query, you can choose Run Look to run the saved Look.
|Look ID||ID of the look|
Macros in queries
You can use following macros in the query to filter the data. When used with
LookML JSON mode, you can use the macro anywhere within the JSON. When used with
LookML Builder mode, you can use the macro in filter expression only.
|Macro Syntax||Description||Example||Expands to|
|This macro is useful when you want to restrict the results based on a time field and dashboard time range|
|Replace with dashboard from time|
|Replace with dashboard to time|
Templates and variables
To add a new Looker query variable, refer to Add a query variable. Use your Looker data source as your data source for the following available queries.
This template variable query type will return the list of LookML models the datasource have access to.
LookML models explores
This template variable query type will return the list of LookML explores for any given model.