Expand description
Alert orchestration: filter construction, list/get, and the triage mutation plans behind the CLI guard.
Structs§
- Alert
Filter - The
alerts listfilter set. Every field composes into one boolean query over the measuredkibana.alert.*fields (triage spec section 4). - Alert
List - Assign
Plan - Edit
Report - The tags/assignees report: the same counters without a target status.
- Query
Status Plan - Resolved
Alert - One explicitly named alert, resolved before a preview.
- Status
Plan - Status
Report - The mutation report the CLI renders.
failedis elasticctl’s judgment — route failures plus, under--conflicts abort, version conflicts — and drives the non-zero exit; the verbatim counters render beside it. - Tags
Plan
Constants§
- QUERY_
SAMPLE_ SIZE - RESOLVE_
SOURCE_ FIELDS _sourcefieldsresolve_idsrequests: only what a mutation preview renders (rule name and current workflow status), not the whole document.pubso the fixture recorder can send the identical production body instead of a hand-rolled approximation (triage spec section 10).
Functions§
- apply_
assign - apply_
status_ by_ ids - apply_
status_ by_ query - apply_
tags - build_
query - Compose the filter into one boolean query, resolving
ruleandassigneefirst. An empty filter is an explicitmatch_all. - default_
sort - Newest first, with
kibana.alert.uuidas the total-order tiebreakersearch_afterneeds. - export
- The
--outpath: page the filtered set fully, or stop atlimitrows when the caller passes one (matchingsearch dsl --out --limit). - get_one
alerts get: an_id-filtered search returning one document.- list
- One bounded peek:
limit + 1rows so truncation is observable without a second request. - plan_
assign - plan_
status_ by_ ids - plan_
status_ by_ query - Resolve the operator’s query to a count and a sample so the implicit set is visible before it is mutated (triage spec section 6).
- plan_
tags - since_
clause --sinceas a range clause:<digits><s|m|h|d|w>becomesnow-<dur>; anything else passes through verbatim for the server to validate as a timestamp or date-math expression.