grafana-util change inspect
What this page covers
Inspect the staged change package from discovered or explicit inputs.
When to open this page
- Start here when you need the shortest path to understand what the staged package contains.
- Use this before change check or change preview when you want to size the package first.
- Prefer this over lower-level summary when the staged inputs may come from mixed workspace artifacts instead of only one desired.json.
Who this page is for
Best for review-first workflows where you want summary, preflight, plan, and apply to stay explicit.
Purpose
Inspect the staged change package from discovered or explicit inputs.
When to use
- Start here when you need the shortest path to understand what the staged package contains.
- Use this before
change checkorchange previewwhen you want to size the package first. - Prefer this over lower-level
summarywhen the staged inputs may come from mixed workspace artifacts instead of only onedesired.json.
Before / After
- Before: the change package is still just a set of directories, files, or staged contracts on disk.
- After: you have one overview-style document that tells you which sections were discovered and how large the change appears to be.
Key flags
--workspace: auto-discover common staged inputs from the current repo, export tree, or provisioning tree.--desired-file: inspect one explicit desired change file.--dashboard-export-dir,--dashboard-provisioning-dir: inspect dashboard staged inputs directly.--alert-export-dir,--datasource-provisioning-file: add alert and datasource staged inputs explicitly.--source-bundle: inspect an existing source bundle instead of per-surface directories.--output-format: render astextorjson.--output-file,--also-stdout: persist the rendered output if you want a review artifact.
Examples
# Purpose: Inspect the staged package from repo-local inputs.
grafana-util change inspect --workspace .
Expected Output:
CHANGE PACKAGE SUMMARY:
- dashboards: 5 modified, 2 added
- alerts: 3 modified
- datasources: 1 referenced inventory
- total impact: 11 operations
# Purpose: Inspect the staged package directly from an export tree.
grafana-util change inspect --workspace ./dashboards/raw --output-format json
Expected Output:
{
"kind": "grafana-utils-overview",
"schemaVersion": 1,
"sections": [
{
"title": "Dashboards"
}
],
"projectStatus": {}
}
This confirms that inspect found staged inputs and rendered the shared overview-style document instead of failing discovery.
What success looks like
- the command tells you what staged surfaces were discovered
- the package size looks plausible before you spend time on preview or apply
- the JSON output is stable enough to hand to another operator or attach to review notes
Failure checks
- if discovery finds nothing, retry with an explicit input flag before assuming the files are broken
- if the package looks unexpectedly small or large, verify that
--workspacepoints at the right export tree or repo root - if JSON consumers read the result, validate
kindandschemaVersionbefore deeper parsing