> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Grafana dashboards

You can export dashboards from Grafana as JSON, then import them into Chronosphere
as [classic dashboards](/observe/dashboards/classic-dashboards).
For steps on exporting a dashboard from Grafana, see its [documentation](https://grafana.com/docs/grafana/v7.5/dashboards/export-import/).

<Warning>
  Chronosphere supports dashboards exported from Grafana versions up to 7.5. Dashboards
  exported from newer versions of Grafana might not be importable without modification.
</Warning>

<Tabs>
  <Tab title="Web" id="import-a-grafana-dashboard-web">
    To import a Grafana dashboard in the Observability Platform interface, see
    [import a dashboard](/observe/dashboards#import-a-dashboard-with-json).
  </Tab>

  <Tab title="Chronoctl" id="import-a-grafana-dashboard-chronoctl">
    <Note>
      You need Chronoctl installed and configured. Read the
      [Chronoctl documentation](/tooling/chronoctl) for more details.
    </Note>

    1. From a directory of Grafana dashboard JSON files, run `chronoctl convert grafana`
       to write [Chronoctl](/tooling/chronoctl) YAML to a file:

       ```shell theme={null}
       chronoctl convert grafana -D <DIRECTORY> > <DASHBOARDS FILE.YML>
       ```

       Replace *`DIRECTORY`* with the path that contains the JSON files, and replace
       *`DASHBOARDS FILE.YML`* with the output filename.
    2. Optional: Add the `--graphite-datasource` option to the `convert grafana` command
       for dashboards that use a Graphite data source.
    3. Apply the YAML to import the dashboards:

       ```shell theme={null}
       chronoctl apply -f DASHBOARDS FILE.YML
       ```

       Replace *`DASHBOARDS FILE.YML`* with the same output filename you used with
       `convert grafana`.
  </Tab>

  <Tab title="Terraform" id="import-a-grafana-dashboard-terraform">
    To import a Grafana dashboard using [Terraform](/tooling/infrastructure/terraform):

    1. Declare a `chronosphere_classic_dashboard` resource in a Terraform file and provide
       a resource name.

       For example, the following code creates a dashboard that Terraform refers to as
       `kubelet` and Chronosphere associates with a specific collection:

       ```terraform theme={null}
       resource "chronosphere_classic_dashboard" "kubelet" {
         # Reference to the collection to which the alert belongs
         collection_id = chronosphere_bucket.service.id

         # Inlined Grafana dashboard JSON. Note the inlined service_name variable in the definition
         dashboard_json = <<EOF
       {
         "title": "${var.service_name} Overview",
         // ...
       }
       EOF
       }
       ```
    2. Add the [Grafana dashboard JSON](https://grafana.com/docs/grafana/v7.5/dashboards/export-import/)
       inline as the content of the `dashboard_json` field. If the Grafana dashboard sets
       the `uid` field, the Terraform provider ignores it and assigns a unique identifier.
    3. Use `terraform apply` to apply the Terraform file and create the resource.
  </Tab>
</Tabs>
