grafana-util docs

grafana-util alert new-contact-point

What this page covers

Create a low-level staged alert contact point scaffold.

When to open this page

  • Seed a new contact point file in a desired-state tree.
  • Start from a scaffold before filling in receiver details.

Who this page is for

Best for operators who review alert rules, routes, contact points, and staged alert changes.

Purpose

Create a low-level staged alert contact point scaffold.

When to use

  • Seed a new contact point file in a desired-state tree.
  • Start from a scaffold before filling in receiver details.

Key flags

  • --desired-dir points to the staged alert tree.
  • --name seeds the scaffold name.

Before / After

  • Before: start from an empty file and remember every alert contact point field yourself.
  • After: generate a scaffold with the right file name and place to fill in receiver details.

What success looks like

  • The scaffold file exists where you expected it in the desired-state tree.
  • The generated file is a clean starting point for adding receiver details.

Failure checks

  • Check --desired-dir if the scaffold does not land in the tree you expect.
  • Verify the name if the scaffold collides with an existing contact point.

Examples

# Purpose: Create a low-level staged alert contact point scaffold.
grafana-util alert new-contact-point --desired-dir ./alerts/desired --name pagerduty-primary
# Purpose: Create a low-level staged alert contact point scaffold.
grafana-util alert add-contact-point --desired-dir ./alerts/desired --name pagerduty-primary