grafana-util docs

grafana-util-datasource-delete.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-delete - Delete one live Grafana datasource through the Grafana API.

SYNOPSIS

grafana-util datasource delete [OPTIONS]

DESCRIPTION

Delete one live Grafana datasource through the Grafana API.

Use this when a datasource should be removed by UID or by name, either as a dry run or as an acknowledged live delete.

BEFORE / AFTER

  • Before: deleting a datasource often depended on remembering the exact row in the UI or typing a name from memory.
  • After: one command can target a UID or name, show a dry run, and make the final live delete explicit.

COMMON OPTIONS

--uid
datasource UID to delete.
--name
datasource name to delete when UID is not available.
--yes
acknowledge the live delete.
--dry-run, --table, --json, --output-format, --no-header
preview output controls.

SUCCESS CRITERIA

  • the target datasource is obvious before any live deletion
  • --dry-run makes the action reviewable
  • --yes is only used when the operator intentionally wants the live delete

FAILURE CHECKS

  • if the command points at the wrong datasource, verify the UID or name before retrying
  • if the dry-run is empty, check whether the org scope actually exposes the target datasource
  • if the live delete is rejected, confirm whether the account has delete permission for that org

EXAMPLES

Delete one live Grafana datasource through the Grafana API.

grafana-util datasource delete --url http://localhost:3000 --basic-user admin --basic-password admin --uid prom-main --dry-run --json

SEE ALSO

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