Command reference
deployments monitor
Monitors that email members and send webhook events when something needs attention
| Command | Summary |
|---|---|
deployments monitor list | List monitors |
deployments monitor create | Create a monitor |
deployments monitor show | Show a monitor |
deployments monitor update | Change, mute, or unmute a monitor |
deployments monitor archive | Archive a monitor |
deployments monitor test | Send a test alert to yourself and the monitor's webhooks |
deployments monitor incidents | List alert incidents, newest first |
deployments monitor incident | Show one alert incident with its timeline |
deployments monitor notification-settings | Show your alert email settings |
deployments monitor set-notification-settings | Turn your alert emails on or off, or mute monitors |
deployments monitor list
List monitors.
deployments monitor list- Calls
GET /v1/monitors(SDKlistMonitors). - Needs an organization:
--orgor the saved context. - Paginated.
--page-sizesets the page size; pass the returned cursor as--cursorfor the next page.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--cursor | string (cursor) | Pagination cursor | ||
--page-size | string (number) | Page size |
Also accepts the global flags.
deployments monitor create
Create a monitor.
deployments monitor create --name <name> --condition <json> --notify <json>- Calls
POST /v1/monitors(SDKcreateMonitor). - Needs an organization:
--orgor the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--name | string | yes | Monitor name | |
--condition | string (json) | yes | Condition as JSON | |
--notify | string (json) | yes | Who to notify as JSON | |
--project-id | string | Project of an environment monitor | ||
--environment-id | string | Environment the monitor watches | ||
--renotify-minutes | string (number) | Repeat the notification this often while firing |
Also accepts the global flags.
deployments monitor show
Show a monitor.
deployments monitor show <id>- Calls
GET /v1/monitors/{id}(SDKgetMonitor). - Needs an organization:
--orgor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID |
Also accepts the global flags.
deployments monitor update
Change, mute, or unmute a monitor.
deployments monitor update <id>- Calls
PATCH /v1/monitors/{id}(SDKupdateMonitor). - Needs an organization:
--orgor the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID | |
--name | string | Monitor name | ||
--condition | string (json) | Condition as JSON, e.g. {"kind":"run-failures","threshold":3,"windowMinutes":15} | ||
--notify | string (json) | Who to notify as JSON, e.g. {"emailRoles":["owner"],"emailPrincipalIds":[],"webhooks":true} | ||
--mute | string (json) | Mute as JSON: {} until unmuted, {"until":"<time>"}, or null to unmute | ||
--renotify-minutes | string (number) | Repeat the notification this often while firing |
Also accepts the global flags.
deployments monitor archive
Archive a monitor.
deployments monitor archive <id>- Calls
DELETE /v1/monitors/{id}(SDKarchiveMonitor). - Needs an organization:
--orgor the saved context. - Destructive. Live runs ask for confirmation; pass
--yesin scripts or with--json. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID |
Also accepts the global flags.
deployments monitor test
Send a test alert to yourself and the monitor's webhooks.
deployments monitor test <id>- Calls
POST /v1/monitors/{id}/test(SDKtestMonitor). - Needs an organization:
--orgor the saved context. - Sends an idempotency key. The CLI generates one per run; pass
--idempotency-keyto retry safely.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID |
Also accepts the global flags.
deployments monitor incidents
List alert incidents, newest first.
deployments monitor incidents- Calls
GET /v1/alert-incidents(SDKlistAlertIncidents). - Needs an organization:
--orgor the saved context. - Paginated.
--page-sizesets the page size; pass the returned cursor as--cursorfor the next page.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--cursor | string (cursor) | Pagination cursor | ||
--page-size | string (number) | Page size | ||
--environment-id | string | Only this environment |
Also accepts the global flags.
deployments monitor incident
Show one alert incident with its timeline.
deployments monitor incident <id> <incident-id>- Calls
GET /v1/monitors/{id}/incidents/{incidentId}(SDKgetAlertIncident). - Needs an organization:
--orgor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
<id> | positional | yes | Resource ID | |
<incident-id> | positional | yes | Incident ID |
Also accepts the global flags.
deployments monitor notification-settings
Show your alert email settings.
deployments monitor notification-settings- Calls
GET /v1/alert-notification-preferences(SDKgetAlertNotificationPreferences). - Needs an organization:
--orgor the saved context.
Also accepts the global flags.
deployments monitor set-notification-settings
Turn your alert emails on or off, or mute monitors.
deployments monitor set-notification-settings --email <email> --muted-monitor-ids <json>- Calls
PUT /v1/alert-notification-preferences(SDKputAlertNotificationPreferences). - Needs an organization:
--orgor the saved context.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--email | string | yes | all or none | |
--muted-monitor-ids | string (json) | yes | Monitor IDs to mute as a JSON array |
Also accepts the global flags.