Loading...
Loading...
Create and manage Cargo alerts — scheduled threshold checks that watch workflow telemetry (spans, runs, records), a storage model's health, or an arbitrary SQL query, and fire actions (a connector, tool, or agent run) when a metric breaches. Use when the user wants to be notified about error-rate spikes, cost blowouts, slow nodes, stalled syncs, stale or empty models, a workflow that stopped running (dead-man's switch), or any "alert me when <metric> crosses <value>" monitoring; and to list, preview, update, or inspect the firing history of those alerts.
npx skill4agent add getcargohq/cargo-skills cargo-observabilitycargo-diagnosticscargo-ai observability alert … # the alert CRUD + preview surface
cargo-ai observability event … # an alert's firing history| Part | Flag | What it is |
|---|---|---|
| Scope | | What to measure — one of six sources: |
| Threshold | | When it breaches — a |
| Actions | | What happens on breach — an |
errorRatefreshnessreferences/scopes-and-thresholds.md--scope--thresholdpreviewcreatealert previewcargo-ai observability alert preview \
--scope '{"kind":"runs","workflowUuid":"<uuid>","statuses":["error"]}' \
--threshold '{"metric":"errorRate","operator":"gte","value":10}' \
--window-minutes 1440 # last 24h; default 60outcome: "computed"{ value, total, failed, isBreached }valueoutcome: "empty"references/alert-lifecycle.mdoutcome: "notComputed"{ errorMessage }--window-minutesspansrunsrecordsmodelerrorobservability:readobservability:writecargo-ai observability alert create \
--name "CRM sync error rate" \
--description "Page when the HubSpot sync starts failing" \
--cron "*/30 * * * *" \
--scope '{"kind":"runs","workflowUuid":"<workflow-uuid>","statuses":["error"]}' \
--threshold '{"metric":"errorRate","operator":"gte","value":10}' \
--actions '[{"kind":"agent","agentUuid":"<agent-uuid>","config":{"message":"{{alert.name}} breached: {{event.value}}% errors. {{alert.url}}"}}]'--cron@every <interval>@every 30m--disabledupdate --enabled true--folder <uuid>cargo-workspace-management--actions{{alert.*}}{{event.*}}references/alert-lifecycle.mdagentUuidtoolUuidconnectorUuidcargo-ai observability alert list # all alerts, each with its lastEvent
cargo-ai observability alert get <uuid> # one alert + its lastEvent
cargo-ai observability alert update --uuid <uuid> \
--enabled false # pause it (true/false — must be literal)
cargo-ai observability alert update --uuid <uuid> \
--threshold '{"metric":"errorRate","operator":"gte","value":20}' # raise the bar
cargo-ai observability alert update --uuid <uuid> \
--description none # "none" clears; --folder none unfiles
cargo-ai observability alert remove <uuid>--enabledtruefalse--enabled yesupdate--description none--folder nonecargo-ai observability event list <alertUuid> # latest evaluation events, newest firststatushealthyunhealthyerrorvaluescopethresholdactionsrunUuidscargo-diagnosticsorchestration run geterrorMessageerrorunhealthyerrorlte{{alert.*}}{{event.*}}references/alert-lifecycle.mdreferences/examples/recipes.mdcount lte 0defineAlertcargo-ai observability alert …defineAlert../cargo-cdk/SKILL.md../cargo-gtm/provider-playbooks/../cargo-gtm/references/cost-discipline.md../cargo/references/prerequisites.md--oauth--tokencargo-ai whoamiobservability:readobservability:writeobservability:writecargo-workspace-managementcargo-ai workspaceManagement report create \
--title "<one-line summary>" \
--description "<exact command(s), errorMessage verbatim, expected vs actual, UUIDs>"../cargo/references/interaction.mdalert getevent list