grafana-util alert diff
What this page covers
Compare local alerting export files against live Grafana resources.
When to open this page
- Check a raw export directory against Grafana before import or plan work.
- Render the diff as plain text or structured JSON.
Who this page is for
Best for operators who review alert rules, routes, contact points, and staged alert changes.
Purpose
Compare local alerting export files against live Grafana resources.
When to use
- Check a raw export directory against Grafana before import or plan work.
- Render the diff as plain text or structured JSON.
Key flags
--diff-dirpoints to the raw export directory.--output-format jsonrenders the diff as structured JSON.--jsonremains available as a compatibility flag equivalent to--output-format json.--dashboard-uid-mapand--panel-id-maprepair linked alert rules during comparison.
Examples
# Purpose: Compare local alerting export files against live Grafana resources.
grafana-util alert diff --url http://localhost:3000 --diff-dir ./alerts/raw
# Purpose: Compare local alerting export files against live Grafana resources.
grafana-util alert diff --url http://localhost:3000 --diff-dir ./alerts/raw --output-format json
Related commands
CLI schema lookup:
grafana-util alert diff --help-schema- shared diff JSON contract