grafana-util docs

grafana-util-datasource-import.1

Browser-readable rendering of a generated roff manpage.

This page renders the generated roff manpage into readable HTML for browser use. For richer per-subcommand detail, prefer the command-reference pages.

NAME

grafana-util-datasource-import - Import datasource inventory through the Grafana API.

SYNOPSIS

grafana-util datasource import [OPTIONS]

DESCRIPTION

Import datasource inventory through the Grafana API.

Use this when you have a local datasource bundle or provisioning tree and want to push it into Grafana, either live or as a dry run.

BEFORE / AFTER

  • Before: importing datasource bundles usually meant manually reconciling files, orgs, and secrets before touching Grafana.
  • After: one import command can preview the plan, reconcile org routing, and then push the bundle with the right guardrails.

COMMON OPTIONS

--input-dir
source path for inventory or provisioning input.
--input-format
choose inventory or provisioning.
--org-id, --use-export-org, --only-org-id, --create-missing-orgs
control cross-org routing.
--replace-existing, --update-existing-only, --require-matching-export-org
import safety and reconciliation controls.
--secret-values
resolve placeholder secrets during import.
--dry-run, --table, --json, --output-format, --no-header, --output-columns, --progress, --verbose
preview and reporting controls.

SUCCESS CRITERIA

  • the import preview shows which orgs and datasources will change
  • provisioning and inventory inputs both route correctly
  • secrets are resolved before the live import, not after the damage is done

FAILURE CHECKS

  • if the import touches the wrong org, verify the routing flags before trying again
  • if the plan is incomplete, confirm the --input-format and whether the bundle is inventory or provisioning
  • if secrets stay unresolved, check the placeholder map and the provided secret values

EXAMPLES

Import datasource inventory through the Grafana API.

grafana-util datasource import --url http://localhost:3000 --basic-user admin --basic-password admin --input-dir ./datasources --dry-run --table

SEE ALSO

grafana-util(1), grafana-util-datasource(1)