Table: grafana_team - Query Grafana Teams using SQL
Grafana is a platform for analytics and visualization that allows you to query, visualize, alert on, and understand your metrics. Teams in Grafana are groups of users that reflect the organization in your system. Teams allow you to grant permissions for managing dashboards and data sources to specific groups of users.
Table Usage Guide
The grafana_team
table provides insights into Teams within Grafana. As a DevOps engineer, explore team-specific details through this table, including team members, permissions, and associated metadata. Utilize it to manage and organize user access to dashboards and data sources.
Examples
List all teams
Explore all the teams available in your Grafana instance to manage permissions and access controls more effectively.
select *from grafana_team;
select *from grafana_team;
List teams with the most members
Discover the teams that have the highest number of members. This information can be useful in understanding team dynamics and resource allocation within the organization.
select name, member_countfrom grafana_teamorder by member_count desclimit 5;
select name, member_countfrom grafana_teamorder by member_count desclimit 5;
List teams with no members (e.g. to clean up)
Determine the teams that currently have no members, which may be useful for organizational cleanup or restructuring.
select name, member_countfrom grafana_teamwhere member_count = 0;
select name, member_countfrom grafana_teamwhere member_count = 0;
Schema for grafana_team
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
avatar_url | text | URL of the avatar for the team. | |
text | Email of the team. | ||
home_dashboard_id | bigint | Home dashboard for the team. | |
id | bigint | = | Unique identifier for the team. |
member_count | bigint | Number of members in the team. | |
name | text | Name of the team. | |
org_id | bigint | Org the team is a member of. | |
query | text | = | Query term for searching teams. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
theme | text | UI theme for the team. | |
timezone | text | Timezone for the team. |
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_team