Table: grafana_dashboard - Query Grafana Dashboards using SQL
Grafana is a multi-platform open-source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources, including Prometheus, InfluxDB, and many others. Grafana is most commonly used for visualizing time series data for infrastructure and application analytics.
Table Usage Guide
The grafana_dashboard
table provides insights into Grafana Dashboards within Grafana. As a Data Analyst or DevOps engineer, explore dashboard-specific details through this table, including the layout, panels, variables, and associated metadata. Utilize it to uncover information about dashboards, such as the data sources used, the types of panels and visualizations, and the overall layout and structure of the dashboards.
Examples
List all dashboards
Discover the segments that contain all your dashboards with this query. It can be used to quickly access the details of each dashboard, such as its ID, title, and URL, without having to navigate through each one individually.
select id, title, urlfrom grafana_dashboard;
select id, title, urlfrom grafana_dashboard;
List all dashboards with a specific tag
Analyze the settings to understand which dashboards are associated with a specific tag. This can be useful in identifying and organizing dashboards relevant to a particular application or project.
select id, title, url, tagsfrom grafana_dashboardwhere tags ? 'my-app';
Error: SQLite does not support the '?' operator for JSON arrays.
List all panels for a specific dashboard
Gain insights into the different panels within a specific Grafana dashboard. This allows you to understand and manage the types and titles of panels for a selected dashboard.
select p ->> 'title' as panel_title, p ->> 'type' as panel_typefrom grafana_dashboard as d, jsonb_array_elements(model -> 'panels') as pwhere d.id = 3;
select json_extract(p.value, '$.title') as panel_title, json_extract(p.value, '$.type') as panel_typefrom grafana_dashboard as d, json_each(d.model, '$.panels') as pwhere d.id = 3;
Schema for grafana_dashboard
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
dashboard_type | text | Type of the dashboard, e.g. dash-db. | |
folder_id | bigint | Unique identifier of the folder that contains the dashboard. | |
folder_title | text | Title of the folder that contains the dashboard. | |
folder_uid | text | Globally unique identifier of the folder that contains the dashboard. | |
folder_url | text | URL of the folder that contains the dashboard. | |
id | bigint | Unique identifier for the dashboard. | |
is_starred | boolean | True if the dashboard has been starred. | |
model | jsonb | Full data model representing the dashbaord configuration. | |
slug | text | Slug of the dashboard. | |
tags | jsonb | List of tags for the dashboard. | |
title | text | Title of the dashboard. | |
uid | text | Globally unique identifier for the dashboard. | |
uri | text | URI of the dashboard. | |
url | text | URL of the dashboard. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- grafana
You can pass the configuration to the command with the --config
argument:
steampipe_export_grafana --config '<your_config>' grafana_dashboard