grafana-util docs

grafana-util-alert-export.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-alert-export - Export alerting resources into raw/ JSON files.

SYNOPSIS

grafana-util alert export [OPTIONS]

DESCRIPTION

Export alerting resources into raw/ JSON files.

  • Capture alert rules, contact points, mute timings, templates, and policies from Grafana.
  • Build a local bundle before review or import.

BEFORE / AFTER

  • Before: capture alert rules, contact points, mute timings, templates, and policies by hand from Grafana.
  • After: export one reproducible raw/ bundle that you can review, diff, or feed into import.

COMMON OPTIONS

  • --output-dir writes the export bundle, defaulting to alerts.
  • --flat writes resource files directly into their resource directories.
  • --overwrite replaces existing export files.
  • Uses the shared connection flags from grafana-util alert.

SUCCESS CRITERIA

  • The output directory contains the expected raw/ resource files.
  • The bundle covers the resource kinds you expected for that org or profile.
  • You can hand the bundle to alert diff or alert import without editing its shape first.

FAILURE CHECKS

  • Check that the connection flags point at the right Grafana instance and org scope.
  • Use --overwrite only when you really intend to replace the existing export tree.
  • If the bundle looks incomplete, verify token scope or switch to a profile with broader access.

EXAMPLES

Export alerting resources into raw/ JSON files.

grafana-util alert export --url http://localhost:3000 --basic-user admin --basic-password admin --output-dir ./alerts --overwrite

SEE ALSO

grafana-util(1), grafana-util-alert(1)