Port monitor (Monitor V2) commands from the Go fork
Source: beengud/observe PR #6. Files: cmd_monitorv2.go, ot_monitorv2.go.
New CLI status: Partial. New CLI alert list/view can read alerts and shows associated monitor id/name/description, but there is no Monitor V2 management/preview.
Old command surface
observe list monitor [<name-substring>] # searchMonitorV2 -> id, name, disabled, updatedDate
observe get monitor <id> # monitorV2 -> YAML incl. definition block
observe monitor preview-query <file.json> # evaluateMonitorV2Source -> compiled OPAL pipeline + result schema
observe monitor preview [--workspace <id>] <file.json> # previewMonitorV2 -> "Would fire: true/false" + sample alarm groupings
observe monitor alarms [--workspace <id>] [--monitor-id <id>] [--since <duration>] [--level <level>] # searchMonitorV2Alarms -> id, monitorId, level, status, startTime, endTime
Flags: --workspace, --monitor-id, --since, --level (critical|error|warning|informational).
Behavior / API
preview-query → evaluateMonitorV2Source; preview → previewMonitorV2; alarms → searchMonitorV2Alarms; list/get → searchMonitorV2/monitorV2.
- Input JSON is a
MonitorV2Input (min: name, ruleKind, definition).
Acceptance
- list/get/preview-query/preview/alarms ported;
--format support; tests ported. Consider whether to also add create/update (old fork relied on web for create).
Port
monitor(Monitor V2) commands from the Go forkSource:
beengud/observePR #6. Files:cmd_monitorv2.go,ot_monitorv2.go.New CLI status: Partial. New CLI
alert list/viewcan read alerts and shows associated monitor id/name/description, but there is no Monitor V2 management/preview.Old command surface
Flags:
--workspace,--monitor-id,--since,--level(critical|error|warning|informational).Behavior / API
preview-query→evaluateMonitorV2Source;preview→previewMonitorV2;alarms→searchMonitorV2Alarms; list/get →searchMonitorV2/monitorV2.MonitorV2Input(min:name,ruleKind,definition).Acceptance
--formatsupport; tests ported. Consider whether to also add create/update (old fork relied on web for create).