Documentation
How-To Guides
Grafana

Grafana Importer

This guide will show you how to import Grafana dashboards to Guance Cloud.

Training

Import

Search and import from Grafana instance

When you have a Grafana instance running, you can search and import dashboards from it.

First, configure the Grafana instance URL and API key in environment variables.

export GRAFANA_URL=http://localhost:3000
export GRAFANA_AUTH=xxxxxxxxxxx

The variable GRAFANA_AUTH is a service account token of Grafana Instance. To create a Grafana service account token, click on Administration in the left-side menu, and then Service Accounts. For more information on how to use service account tokens, refer to the Service Accounts (opens in a new tab) documentation.

Then run the following command to search and import dashboards.

guance iac import grafana --search --search-tag kubernetes

Import from Grafana Template

When you want to import a specific dashboard, you can use the Grafana Template ID.

No auth is required to import from Grafana Template.

guance iac import grafana --template-id 1860

It will download the dashboard from Grafana Dashboard Templates (opens in a new tab) and import it.

Import from file

You can also copy and save the Dashboard JSON Model (opens in a new tab) into local file.

Then run the following command to import from file directly.

guance iac import grafana -f ./input.json

Review

The imported dashboard will be saved in the out folder.

      • 1860.json
    • main.tf
  • Apply

    Observability as Code (Recommended)

    We recommend you to use Terraform (opens in a new tab) to manage your dashboards. So you can synchronous the dashboard changes from Grafana to Guance Cloud programmatically

    You can following our Online Training (opens in a new tab) to learn how to use this way to archive that.

    Upload directly

    If you want to test or debug your dashboard, you can also upload it directly.

    Click on the Create > Import template button in the Guance dashboard page, and select the dashboard file.

    Last updated on