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.
The
chronoctl convert command is a feature available only in the deprecated v0.x.x
versions of Chronoctl, which are maintained separately from the supported v1.x versions
of Chronoctl. To install a v0.x.x version, see
Download and install a v0.x.x version.convert grafana
command:Copy
Ask AI
chronoctl convert grafana -D <DIRECTORY> > <DASHBOARDS FILE.YML>
DIRECTORY: A path containing Grafana dashboard JSON files.DASHBOARDS FILE.YML: A filename into which Chronoctl saves the resulting YAML.
--graphite-datasource option.To import the converted dashboard, use the apply command:Copy
Ask AI
chronoctl apply -f DASHBOARDS FILE.YML
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:CopyAsk AIresource "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.