grafana-util alert clone-rule
What this page covers
Clone an existing staged alert rule into a new authoring target.
When to open this page
- Reuse an existing rule as a starting point for a variant.
- Override folder, rule group, receiver, or route behavior while cloning.
Who this page is for
Best for operators who review alert rules, routes, contact points, and staged alert changes.
Purpose
Clone an existing staged alert rule into a new authoring target.
When to use
- Reuse an existing rule as a starting point for a variant.
- Override folder, rule group, receiver, or route behavior while cloning.
Key flags
--desired-dirpoints to the staged alert tree.--sourceidentifies the rule to clone.--namesets the new rule name.--folder,--rule-group,--receiver, and--no-routeadjust the clone target.--dry-runpreviews the cloned output.
Examples
# Purpose: Clone an existing staged alert rule into a new authoring target.
grafana-util alert clone-rule --desired-dir ./alerts/desired --source cpu-high --name cpu-high-staging --folder staging-alerts --rule-group cpu --receiver slack-platform
# Purpose: Clone an existing staged alert rule into a new authoring target.
grafana-util alert clone-rule --desired-dir ./alerts/desired --source cpu-high --name cpu-high-staging --dry-run