steampipe plugin install grafana

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,
url
from
grafana_dashboard;
select
id,
title,
url
from
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,
tags
from
grafana_dashboard
where
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_type
from
grafana_dashboard as d,
jsonb_array_elements(model -> 'panels') as p
where
d.id = 3;
select
json_extract(p.value, '$.title') as panel_title,
json_extract(p.value, '$.type') as panel_type
from
grafana_dashboard as d,
json_each(d.model, '$.panels') as p
where
d.id = 3;

Schema for grafana_dashboard

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
dashboard_typetextType of the dashboard, e.g. dash-db.
folder_idbigintUnique identifier of the folder that contains the dashboard.
folder_titletextTitle of the folder that contains the dashboard.
folder_uidtextGlobally unique identifier of the folder that contains the dashboard.
folder_urltextURL of the folder that contains the dashboard.
idbigintUnique identifier for the dashboard.
is_starredbooleanTrue if the dashboard has been starred.
modeljsonbFull data model representing the dashbaord configuration.
slugtextSlug of the dashboard.
tagsjsonbList of tags for the dashboard.
titletextTitle of the dashboard.
uidtextGlobally unique identifier for the dashboard.
uritextURI of the dashboard.
urltextURL 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