Classic dashboard API endpoints are not available for organizations on standard
dashboards. Requests to these endpoints return an error. To manage dashboards
programmatically in these environments, use the
standard dashboard endpoints. For information
about your organization’s dashboard configuration, contact
Chronosphere Support.
Chronosphere supports dashboards exported from Grafana versions up to 7.5. Dashboards
exported from newer versions of Grafana might not be importable without modification.
- Web
- Chronoctl
- Terraform
To import a Grafana dashboard in the Observability Platform interface, see
import a dashboard.
You need Chronoctl installed and configured. Read the
Chronoctl documentation for more details.
-
From a directory of Grafana dashboard JSON files, run
chronoctl convert grafanato write Chronoctl YAML to a file:Replacechronoctl convert grafana -D <DIRECTORY> > <DASHBOARDS FILE.YML>DIRECTORYwith the path that contains the JSON files, and replaceDASHBOARDS FILE.YMLwith the output filename. -
Optional: Add the
--graphite-datasourceoption to theconvert grafanacommand for dashboards that use a Graphite data source. -
Apply the YAML to import the dashboards:
Replace
chronoctl apply -f DASHBOARDS FILE.YMLDASHBOARDS FILE.YMLwith the same output filename you used withconvert grafana.
To import a Grafana dashboard using Terraform:
-
Declare a
chronosphere_classic_dashboardresource in a Terraform file and provide a resource name. For example, the following code creates a dashboard that Terraform refers to askubeletand Chronosphere associates with a specific collection: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 } -
Add the Grafana dashboard JSON
inline as the content of the
dashboard_jsonfield. If the Grafana dashboard sets theuidfield, the Terraform provider ignores it and assigns a unique identifier. -
Use
terraform applyto apply the Terraform file and create the resource.

