DebugBundle
CLI

Alert Management

Configure alert channels and conditions with the DebugBundle CLI.

The CLI provides CRUD operations for alert rules. Alerts notify your team through various channels when incident conditions are met.

Channels

ChannelDescriptionConfig Required
emailEmail notificationrecipient_email
slackSlack webhook messagewebhook_url, optional channel
pagerdutyPagerDuty incident triggerrouting_key
opsgenieOpsgenie alertapi_key

Condition Types

ConditionTrigger
incident_openedA new incident is created.
incident_spikeAn unusual spike in incident occurrences is detected.
severity_thresholdAn incident's severity exceeds the configured minimum.

List Alerts

debugbundle alert list --project-id proj_01HXYZ...

Output:

{
  "alerts": [
    {
      "alert_id": "alt_01HABC...",
      "project_id": "proj_01HXYZ...",
      "channel": "slack",
      "condition_type": "incident_opened",
      "service_id": null,
      "severity_min": "high",
      "is_enabled": true,
      "config": {
        "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx",
        "channel": "#incidents"
      }
    }
  ]
}
FlagTypeDefaultDescription
--project-idstringRequired. Project to list alerts for.
--limitnumber50Maximum number of alerts to return.
--auth-filestring~/.debugbundle/auth.jsonPath to auth state file.
--jsonbooleanfalseOutput as JSON.

Create Alert

Email Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel email \
  --condition incident_opened \
  --severity-min high \
  --config-json '{"recipient_email": "oncall@mycompany.com"}'

Slack Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel slack \
  --condition incident_spike \
  --config-json '{"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx", "channel": "#incidents"}'

PagerDuty Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel pagerduty \
  --condition severity_threshold \
  --severity-min critical \
  --config-json '{"routing_key": "your-pagerduty-routing-key"}'

Opsgenie Alert

debugbundle alert create \
  --project-id proj_01HXYZ... \
  --channel opsgenie \
  --condition incident_opened \
  --severity-min high \
  --config-json '{"api_key": "your-opsgenie-api-key"}'

Create Options

FlagTypeDefaultDescription
--project-idstringRequired. Project to create the alert for.
--channelstringRequired. Alert channel: email, slack, pagerduty, opsgenie.
--conditionstringRequired. Condition type: incident_opened, incident_spike, severity_threshold.
--service-idstringScope alert to a specific service.
--severity-minstringMinimum severity to trigger: low, medium, high, critical.
--config-jsonstringChannel-specific configuration as JSON string.
--is-enabledbooleantrueWhether the alert is active.
--auth-filestring~/.debugbundle/auth.jsonPath to auth state file.
--jsonbooleanfalseOutput as JSON.

Update Alert

debugbundle alert update alt_01HABC... \
  --severity-min critical \
  --is-enabled true

Partial update — only the specified fields are changed.

FlagTypeDescription
--channelstringUpdate channel type.
--conditionstringUpdate condition type.
--service-idstringUpdate service scope (use null to clear).
--severity-minstringUpdate minimum severity (use null to clear).
--config-jsonstringUpdate channel configuration (use null to clear).
--is-enabledbooleanEnable or disable the alert.
--auth-filestringPath to auth state file.
--jsonbooleanOutput as JSON.

Delete Alert

debugbundle alert delete alt_01HABC...

Permanently removes the alert rule. No further notifications are sent.

Channel Configuration Reference

Email

{
  "recipient_email": "oncall@mycompany.com"
}

Slack

{
  "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx",
  "channel": "#incidents"
}

Create a Slack Incoming Webhook at api.slack.com/messaging/webhooks and use the webhook URL in your alert configuration.

PagerDuty

{
  "routing_key": "your-integration-routing-key"
}

The routing key comes from a PagerDuty Events API v2 integration.

Opsgenie

{
  "api_key": "your-opsgenie-api-key"
}

Next Steps

On this page